Beispiel #1
0
 public static function getColumnId($name)
 {
     $name = trim($name);
     if (is_null(self::$_column_groups)) {
         self::$_column_groups = array();
         foreach (ColumnGroup::search(1) as $group) {
             self::$_column_groups[$group->name] = $group->id;
         }
     }
     if (!array_key_exists($name, self::$_column_groups)) {
         self::$_column_groups[$name] = ColumnGroup::insert(array('name' => $name))->id;
     }
     return self::$_column_groups[$name];
 }