Developer guide     >     Developing Extensions     >     Properties

Extension properties

It is possible to add two types of properties to an Extension, which can extend yeager's UI when displayed in the Extension administration panel and/or considering the Extension is assigned to an object, on an object's Extension tab. Properties do not necessarily need to be visible to Users (see API docs: PropertySettings->add).

Extension administration panel

The Extension administration panel is usually only available to administrators. From here you can install, uninstall and configure Extensions. You can add custom properties which will be displayed to administrations when accessing the Extensions through the Extension administration panel. 
 
  1. // add a property to the Extension
  2. $this->extensionPropertySettings->add("title of field in Extension admin", "PROPERTY_IDENTIFIER", "TEXT");
  3.  
  4. // get a list of all properties and values configured for the Extension
  5. $allvalues = $this->extensionProperties->get();
  6.  
  7. // gets the value of one specific property
  8. $onevalue = $this->extensionProperties->getValue("PROPERTY_IDENTIFIER");
  9.  
  10. // sets the value of one specific property
  11. $this->extensionProperties->setValue('PROPERTY_IDENTIFIER', 'This is a value');

Extension tab

When an Extension is added to an object it may offer additional, editable properties to the User on the Extension tab of the object's detail view. These Properties are object specific and versioned along with the object itself. This means, that changes made to these Properties will not get published instantly - they are rather applied to the working copy of an object and will get approved and published along with the object they are assigned to (see Versioning and Publishing).
  1. // add an Extension property to all objects the Extensions is assigned to  
  2. $this->propertySettings->add("title of field on objects' extension tabs", "PROPERTY_IDENTIFIER", "TEXT");
  3.  
  4. // gets all properties and values of the object and version the Extension is executed on  
  5. $allvalues = $this->properties->get();
  6.  
  7. // gets all properties and values of the object and version the Extension is executed on  
  8. $onevalue = $this->properties->getValue('PROPERTY_IDENTIFIER');
  9.  
  10. // sets a property of the object and version the Extension is executed on
  11. $this->properties->setValue('PROPERTY_IDENTIFIER', 'Another value');

Property types

Properties (when not explicitly hidden) end up as editable form elements displayed to the User in yeager's UI. The type of the form element (single-or multi-line textfield, checkboxes, etc.) is defined when the Property gets added. A full list of Property types is available here: