コード例 #1
0
ファイル: modcategory.php プロジェクト: exside/teleport
function modcategory_populate_category_children(modCategory &$object)
{
    $children = $object->getMany('Children', null, false);
    if ($children) {
        foreach ($children as &$child) {
            if ($child->get('id') == $object->get('id')) {
                continue;
            }
            modcategory_populate_category_children($child);
        }
    }
}
コード例 #2
0
ファイル: getlist.class.php プロジェクト: suasti/mxManager
 /**
  * @param modCategory $category
  *
  * @return array
  */
 protected function _prepareCategoryRow(modCategory $category)
 {
     $type = $this->getProperty('type');
     $row = array('id' => $category->get('id'), 'name' => $category->get('category'), 'categories' => (int) $category->get('categories'), 'elements' => (int) $category->get('elements'));
     $row['type'] = 'category';
     $row['permissions'] = $this->_permissions;
     return $row;
 }