Exemplo n.º 1
0
 /**
  * Действие при обновлении ноды.
  *
  * @param Node $node
  */
 public function updateNode(Node $node)
 {
     $em = $this->container->get('doctrine.orm.entity_manager');
     /** @var Item $item */
     $item = $em->find('TexterModule:Item', $node->getParam('text_item_id'));
     if ($item) {
         $item->setEditor((int) $node->getParam('editor'));
         $em->persist($item);
         $em->flush($item);
     }
 }
 /**
  * Действие при создании ноды.
  *
  * @param Node $node
  */
 public function createNode(Node $node)
 {
     $node->setParams(['items_per_page' => 10]);
 }