Inheritance: extends AbstractInlineContainer
Ejemplo n.º 1
0
 /**
  * @param string                 $url
  * @param ArrayCollection|string $label
  * @param string                 $title
  */
 public function __construct($url, $label = '', $title = '')
 {
     parent::__construct($url);
     if (is_string($label)) {
         $this->setChildren(new ArrayCollection([new Text($label)]));
     } else {
         $this->setChildren($label);
     }
     if (!empty($title)) {
         $this->data['title'] = $title;
     }
 }
Ejemplo n.º 2
0
 /**
  * @param string $url
  * @param ArrayCollection|string|null $label
  * @param string $title
  */
 public function __construct($url, $label = null, $title = '')
 {
     parent::__construct($url);
     if ($label === null) {
         $label = $url;
     }
     if (is_string($label)) {
         $this->children = new ArrayCollection(array(new Text($label)));
     } elseif (is_null($label)) {
         $this->children = new ArrayCollection();
     } else {
         $this->children = $label;
     }
     if (!empty($title)) {
         $this->data['title'] = $title;
     }
 }