A
A
Arris12017-07-26 05:24:32
PHP
Arris1, 2017-07-26 05:24:32

How to study the Bitrix API?

Good afternoon!
When studying Bitrix according to the official documentation at the Administrator level, there are no difficulties - everything is clear.
But when studying the API for developers, I encountered a lack of information, even about simple things like arrays of component templates and infoblocks $ArResutlt, $ArItem, $ArFiles and the like.
For example, I did not find:
1 list of similar arrays with their purpose
2 enumeration of their possible fields (for example, LINK, TEXT)
3 descriptions of their formation I
did a search through the documentation - there were several fragmentary texts in different sections, of a general plan without answering the points above.
It's the same with the functions of Bitrix - there is a large reference book where everything is in a heap, with stingy descriptions, I don't see the relationship between them at all.
I understand that a lot is written on the forum, but as a rule, specific tasks are solved on it in the form of a non-working code - they threw off the working one.
Understanding does not really add, without preliminary theory.
I'm new to programming, maybe I don't understand something? and it's just not documented?
Maybe such things are sorted out on their own using php tools (such as displaying the contents of an array)?
Are all functions manually tested or what?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Nikolaev, 2017-07-26
@Arris1

Good afternoon,
Let's start with the fact that the names of variables do not play a role. Those. You can swap $arSelect and $arFilter in the code and the result will not change (if you did everything right). As for their names, they help you personally understand what is in them and work on the principle of Hungarian notation, with types and camelCase. That is, the $arFilter variable contains an array of fields by which filtering is performed, and $arSelect contains an array of fields to be obtained.
As for the documentation - lies, it is extensive and chewed to the smallest detail. If you want to get a development plan, then:
1) Go through the entire Bitrix chain from "Content Manager" to "Administrator" (all 3) and understand how it works in the admin panel
2) Take the Bitrix Framework course and understand how to work with it from a developer's point of view
3) Actively read the reference literature - https://dev.1c-bitrix.ru/api_help/ and https://dev.1c-bitrix.ru/ api_d7/
4) Look at official bitrix courses https://academy.1c-bitrix.ru/training/course/
5) Take official exams (there are examples of tasks and clear solutions) https://academy.1c-bitrix.ru /certification/exams.php
I assure you that when you pass both the first and second exams, you will already understand everything you need for the Junior-Middle level

I
Ilya, 2017-07-26
@rpsv

Take a typical task and do it.
Not a typical solution (although also as an option), but from scratch, start to understand the problem.
If you understand something on the basis of a typical solution, then you will have knowledge only on the basis of this solution.
If you understand from scratch, then you will have to think and you will understand the task (online store), and not the tool (typical solution).
For example, create an online store, and along the way, already understand and ask questions that have arisen.
And ask questions like "how to study?" not quite correct, because it's not clear what you need.
And when specific tasks arise, then there will be specific questions and, consequently, specific answers.

M
mletov, 2017-07-26
@mletov

The main structural units of Bitrix are information blocks and their elements.
Take a break from this. Many tasks stupidly come down to getting a list of infoblock elements with certain property values, that is, writing an analogue of an sql query, only using Bitrix functions.
CIBlockElement::GetIBlockByID and CIBlockElement::GetList will cover most of your needs for the first time.
As for the $ArResutlt, $ArItem, $ArFiles arrays in templates, var_dump often comes to the rescue. By the contents of the array, it is quite possible to understand what it is responsible for.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question