DBObj = SiteMap::getObj('Contact/Group/Obj.php', isset($_REQUEST['id']) ? $_REQUEST['id'] : null); $this->Doc = $Doc; parent::exec(); } function _doListBind(&$DB_List) { $DB_List->insertColLast( 'title', array( 'title' => 'Title', 'width' => 250, 'tpl' => DB_LIST_CELL_TEXT, 'params' => array('title') ) ); $DB_List->insertColLast( 'cnt', array( 'title' => 'Count of persons', 'tpl' => DB_LIST_CELL_TEXT_CENTER, 'params' => array('person_count') ) ); $DB_List->insertColLast( 'options', array( 'title' => 'Options', 'tpl' => 'Contact/Group/cells/options.tpl', 'edit_link' => BASE_URL . '/' . CURR_PAGE . '?action=edit&id=', 'del_link' => BASE_URL . '/' . CURR_PAGE . '?action=del&id=', 'params' => array('id') ) ); return true; } function addLink() { $link = BASE_URL . '/' . CURR_PAGE; $link_list = array(); if ($this->DBObj->itemsName) { $link_list[] = array('title' => 'Manage ' . $this->DBObj->itemsName . ''); $link_list[] = array( 'title' => 'Manage Persons', 'class' => 'page_title', 'link' => BASE_URL . '/' . CURR_PAGE . '/person' ); } $link_list[] = array('title' => 'Add New ' . $this->DBObj->itemName, 'link' => $link . '?action=new'); $addLink = array( 'tpl' => 'center_link.tpl', 'link_list' => $link_list, ); $this->Doc->addContent($addLink); return true; } function _bindFormFields($form) { $form->addElement('text', 'title', 'Title'); $form->addRuleRequired(array('title')); return $form; } }