/**
  * @param string $key
  * @param ComponentInterface $value
  * @return $this
  */
 public function set($key, $value)
 {
     $parent = $value->parent();
     $parent && $value->internalUnsetParent();
     parent::set($key, $value);
     $parent && $value->internalSetParent($parent);
     return $this;
 }
예제 #2
0
 /**
  * Sets title cell component ('th' tag).
  *
  * @param ContainerComponentInterface $cell
  * @return $this
  */
 public function setTitleCell(ContainerComponentInterface $cell)
 {
     $this->titleCell = $cell;
     $this->titleCell->children()->add($this->titleView, true);
     if ($this->titleCellPart !== null) {
         $this->titleCellPart->setView($cell);
     }
     return $this;
 }
 public function checkDataItemCondition(ComponentInterface $component, $name, $value)
 {
     return $component instanceof ArrayDataAggregateInterface && $component->getDataItem($name) == $value;
 }