Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function getStaticPrefix()
 {
     if (!$this->addLocalePattern) {
         return parent::getStaticPrefix();
     }
     $prefix = $this->getPrefix();
     $path = substr(parent::getPath(), strlen($prefix));
     $path = $prefix . '/{_locale}' . $path;
     return $this->generateStaticPrefix($path, $this->idPrefix);
 }
Ejemplo n.º 2
0
 /**
  * @return Page instance with the specified information
  */
 protected function createPage($manager, $parent, $name, $label, $title, $body)
 {
     $page = new Page();
     $page->setPosition($parent, $name);
     $page->setLabel($label);
     $page->setTitle($title);
     $page->setBody($body);
     $manager->persist($page);
     return $page;
 }