Пример #1
0
 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);
 }
Пример #2
0
 protected function toArray(Node $node, $routeName)
 {
     return ['id' => $node->getIdentifier(), 'path' => $node->getPath(), 'menu_title' => $node->getMenuTitle(), 'title' => $node->getTitle(), 'content' => $node->getContent(), 'routeName' => $routeName];
 }