Path: blob/master/src/view/formation/PHUIFormationColumnItem.php
12249 views
<?php12final class PHUIFormationColumnItem3extends Phobject {45private $id;6private $column;7private $controlItem;8private $resizerItem;9private $isRightAligned;10private $expander;11private $expanders = array();1213public function getID() {14if (!$this->id) {15$this->id = celerity_generate_unique_node_id();16}17return $this->id;18}1920public function setColumn(PHUIFormationColumnView $column) {21$this->column = $column;22return $this;23}2425public function getColumn() {26return $this->column;27}2829public function setControlItem(PHUIFormationColumnItem $control_item) {30$this->controlItem = $control_item;31return $this;32}3334public function getControlItem() {35return $this->controlItem;36}3738public function setIsRightAligned($is_right_aligned) {39$this->isRightAligned = $is_right_aligned;40return $this;41}4243public function getIsRightAligned() {44return $this->isRightAligned;45}4647public function setResizerItem(PHUIFormationColumnItem $resizer_item) {48$this->resizerItem = $resizer_item;49return $this;50}5152public function getResizerItem() {53return $this->resizerItem;54}5556public function setExpander(PHUIFormationExpanderView $expander) {57$this->expander = $expander;58return $this;59}6061public function getExpander() {62return $this->expander;63}6465public function appendExpander(PHUIFormationExpanderView $expander) {66$this->expanders[] = $expander;67return $this;68}6970public function getExpanders() {71return $this->expanders;72}7374public function newClientProperties() {75$column = $this->getColumn();7677$expander_id = null;7879$expander = $this->getExpander();80if ($expander) {81$expander_id = $expander->getID();82}8384$resizer_details = null;85$resizer_item = $this->getResizerItem();86if ($resizer_item) {87$visible_key = $column->getVisibleSettingKey();88$width_key = $column->getWidthSettingKey();89$min_width = $column->getMinimumWidth();90$max_width = $column->getMaximumWidth();9192$resizer_details = array(93'itemID' => $resizer_item->getID(),94'controlID' => $resizer_item->getColumn()->getID(),95'widthKey' => $width_key,96'visibleKey' => $visible_key,97'minimumWidth' => $min_width,98'maximumWidth' => $max_width,99);100}101102$width = $column->getWidth();103if ($width !== null) {104$width = (int)$width;105}106107$is_visible = (bool)$column->getIsVisible();108$is_right_aligned = $this->getIsRightAligned();109110$column_details = $column->newClientProperties();111112return array(113'itemID' => $this->getID(),114'width' => $width,115'isVisible' => $is_visible,116'isRightAligned' => $is_right_aligned,117'expanderID' => $expander_id,118'resizer' => $resizer_details,119'column' => $column_details,120);121}122123}124125126