Invoking functions from XML files

You can create all type of records from XML files, but sometimes it is difficult to generate data that includes some business logic. You might want to modify records when a user installs a dependent module in production. For example, let's say you want to create a module to display books online. The my_library module already has an image-cover field. Imagine that, in the new module, you implemented logic to reduce the size of the image and stored it in the new thumbnail field. Now, when the user installs this module, they might already have books and images. It is not possible to generate thumbnails from the <record> tags in the XML file. In this case, you can invoke the model method through the <function> tag.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset