Skip to content
This repository was archived by the owner on Nov 28, 2017. It is now read-only.

3rd Party Requirements

João Reys Santos edited this page Aug 22, 2016 · 14 revisions

Introduction

Besides core components, third party extensions can also have associations and take advantage of the com_associations list view, as well as the side-by-side for better work-flow. Meeting certain requirements, third party extensions will also be listed on the list view's filters, and on the side-by-side as these images exemplify:

List view: image

Side-by-side: image

Associations Component (com_associations) Requirements

  1. Component should have a ROOT/components/<com_componentname>/helpers/association.php Example here

  2. ROOT/component/<com_componentname>/helpers/association.php needs to load route.php: JLoader::register(<ComponentName>'HelperRoute', JPATH_SITE . '/components/<com_componentname>/helpers/route.php'); Example here

  3. Component using Categories with associations should have the method getCategoryAssociations in ROOT/component/<com_componentname>/helpers/association.php. Example here

  4. Component with associated items should have $associationsContext and $typeAlias defined in the model concerned. Example here and here

  5. Component should have in backend specific modal_associations.php views for the item, parallel to the edit view. Example here Another way is to have chosen fields, any other implementation will not work.

  6. Edit modals have to use &tmpl=component by implementing an EDIT functionnality in ROOT/administrator/components/<com_componentname>/models/fields/modal/<item>, not only a Select. Example: here

  7. Associated item must have the following fields: id, title, alias, language in order to work, com_associations will also use the following fields if they exist: ordering, menutype, level, catid, access, published, created_by, checked_out, checked_out_time the fields mentioned can have other names in case the model contains the variable $_columnAlias, example:

    protected $_columnAlias = array(
        'component_id' => 'id',
        'title'        => 'name',
        'created'      => 'created_by',
    );
  1. Components that support multiple categories context MUST have each item type categories context (aka extension) in their item types models. Exmaple:
    protected $categoriesContext = 'com_mycomponent.myitem1';

Frequent Issues

to do

Clone this wiki locally