/** * ModelTag constructor can be used in config to set alternate field names as: * extensions: * - Modular\Fields\ModelTag('Title', 'ParentID') * * @param string $sourceFieldName e.g. 'Title' * @param string $parentIDFieldName e.g. 'ParentID', if passed then make the tag distinct within children of the ParentID. * @param string $fallbackFieldName e.g. 'URLSegment', allow another field to be used on parents if they do not have the ModelTag extension */ public function __construct($sourceFieldName = 'Title', $parentIDFieldName = '', $fallbackFieldName = '') { $this->sourceFieldName = $sourceFieldName; $this->parentIDFieldName = $parentIDFieldName; $this->fallbackFieldName = $fallbackFieldName; parent::__construct(); }