public function addPropertyList(PHUIPropertyListView $property_list) { $this->propertyLists[] = $property_list; $action_list = $property_list->getActionList(); if ($action_list) { $this->actionListID = celerity_generate_unique_node_id(); $action_list->setId($this->actionListID); } return $this; }
public function addPropertyList(PHUIPropertyListView $property_list, $tab = null) { if (!$tab instanceof PHUIListItemView && $tab !== null) { assert_stringlike($tab); $tab = id(new PHUIListItemView())->setName($tab); } if ($tab) { if ($tab->getKey()) { $key = $tab->getKey(); } else { $key = 'tab.default.' . spl_object_hash($tab); $tab->setKey($key); } } else { $key = 'tab.default'; } if ($tab) { if (empty($this->tabs[$key])) { $tab->addSigil('phui-object-box-tab'); $tab->setMetadata(array('tabKey' => $key)); if (!$tab->getHref()) { $tab->setHref('#'); } if (!$tab->getType()) { $tab->setType(PHUIListItemView::TYPE_LINK); } $this->tabs[$key] = $tab; } } $this->propertyLists[$key][] = $property_list; $action_list = $property_list->getActionList(); if ($action_list) { $this->actionListID = celerity_generate_unique_node_id(); $action_list->setId($this->actionListID); } return $this; }