Exemplo n.º 1
0
 public function main($path)
 {
     $plans = DataCenterDB::getPlans(DataCenterDB::buildSort('meta', 'plan', array('space', 'tense DESC')));
     $numPlans = DataCenterDB::numPlans();
     return DataCenterUI::renderLayout('columns', array(DataCenterUI::renderLayout('rows', array(DataCenterUI::renderWidget('heading', array('message' => 'plans')), DataCenterUI::renderWidget('table', array('rows' => $plans, 'num' => $numPlans, 'fields' => array('name', 'space' => array('field' => 'space_name'), 'tense' => array('format' => 'option')), 'link' => array('page' => 'plans', 'action' => 'view', 'type' => 'plan', 'id' => '#id')))))));
 }
 public function getPlans(array $options = array())
 {
     if ($this->type == 'space') {
         return DataCenterDB::getPlans(array_merge_recursive($options, DataCenterDB::buildCondition('meta', 'plan', 'space', $this->getId())));
     }
     return null;
 }