/**
  * @param RenderableInterface $renderable
  * @return string
  */
 public function render(RenderableInterface $renderable)
 {
     $path = $renderable->getIdentifier();
     while ($renderable = $renderable->getParentRenderable()) {
         $path = $renderable->getIdentifier() . '/' . $path;
     }
     return $path;
 }
Ejemplo n.º 2
0
 /**
  * Remove an element from the ElementsByIdentifier cache
  *
  * @param Renderable\RenderableInterface $renderable
  * @return void
  * @internal
  */
 public function unregisterRenderable(Renderable\RenderableInterface $renderable)
 {
     if ($renderable instanceof FormElementInterface) {
         unset($this->elementsByIdentifier[$renderable->getIdentifier()]);
     }
 }