Exemplo n.º 1
0
 /**
  * Generate the breadcrumb.
  *
  * @return string
  */
 public function generate()
 {
     $template = new BackendTemplate($this->template);
     $template->set('nodes', $this->nodes);
     return $template->parse();
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function generateBackendView(ContentElement $element, $templateName = null)
 {
     $collection = $this->findChildren($element->id);
     $children = array();
     $generated = array();
     if ($collection) {
         foreach ($collection as $child) {
             $children[$child->id] = $child;
             $generated[$child->id] = $this->generateChild($child);
         }
     }
     $template = new BackendTemplate($templateName ?: $this->template);
     $template->set('element', $element)->set('operations', new Operations($this->definition, $this->translator))->set('children', $children)->set('elements', $generated);
     return $template->parse();
 }