Answer the question
In order to leave comments, you need to log in
Bitrix how to write a new method for working with database fields in ORM?
The database has a DESCRIPTION field
to work with this field in the orm.annotations.php file there are several methods:
* @method \Jakiro\EO\GameMode setDescription(\string|\Bitrix\Main\DB\SqlExpression $description)
* @method \Jakiro\EO\GameMode resetDescription()
* @method \Jakiro\EO\GameMode unsetDescription()
And by submitting the form on the site, using this code, you can set the received values in the db field
->setDescription($ob->description)
How to create one more field of your own and write such methods so that they work like ->setDescription($ob->description)?
Answer the question
In order to leave comments, you need to log in
@method is not a method, it's an annotation that is needed for ide.
setDescription - all such calls are handled via the __call magic method
How to create another custom field
write such methods so that they work like ->setDescription($ob->description)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question