/** * Inserts MList <i>$value</i> at the end of the list. * * @param \MToolkit\Core\MList $value */ public function appendList(MList $value) { if ($value->getType() == $this->getType()) { $this->list = array_merge($this->list, $value->toArray()); return; } foreach ($value as $item) { $this->append($item); } }
/** * Sets the data for the given <i>$section</i> in the header with the specified <i>$orientation</i> to the value supplied.<br /> * Returns true if the header's data was updated; otherwise returns false. * * @param int|string $section * @param int|Orientation $orientation * @param mixed $value * @return false */ public function setHeaderData($section, $orientation, $value) { $toReturn = false; if ($this->data->size() > 0) { return $toReturn; } switch ($orientation) { case Orientation::HORIZONTAL: break; case Orientation::VERTICAL: $fields = array_keys($this->data->toArray()); $values = array_values($this->data->toArray()); $fields[$section] = $value; $this->data = array_combine($fields, $values); $toReturn = true; break; } return $toReturn; }