/** * {@inheritdoc} */ protected function build(Definition $definition, \Model $model, DefinitionMapper $mapper, Filter $filter = null, Definition $parent = null) { parent::build($definition, $model, $mapper, $filter); if ($definition instanceof Path && $model->style) { $styleModel = StyleModel::findActiveByPK($model->style); if ($styleModel) { $style = $mapper->handle($styleModel); if ($style instanceof Style) { $style->apply($definition); } } } $this->buildPopup($definition, $model, $mapper, $filter); }
/** * Load fallback style. * * @param DefinitionMapper $mapper The definition mapper. * * @return void */ protected function loadFallbackStyle(DefinitionMapper $mapper) { if ($this->model->style) { $styleModel = StyleModel::findActiveByPK($this->model->style); if ($styleModel) { $this->fallbackStyle = $mapper->handle($styleModel); } } }