public function __invoke(SiteTreeNodeInterface $page) { if ($this->hasPluginForDispatcher($page->getPageTypeId())) { return; } $this->bootPlugin($page->getPageTypeId()); }
public function finalizeSave(Form $form, SiteTreeNodeInterface $model) { $config = $this->configModel()->getConfig($model->getPageTypeId(), $model->getIdentifier()); foreach ($form->getData($this->fieldPrefix()) as $key => $value) { $config->set($key, $value); } $this->configModel()->saveConfig($config, $model->id); }
protected function getPageType(SiteTreeNodeInterface $node) { return $this->pageTypes->get($node->getPageTypeId()); }