コード例 #1
0
ファイル: mpft.php プロジェクト: verbazend/AWFA
  public static function types_by_category($order = array( "Text Content", "Text Content (Specialized)", "Structured Content", "Media", "Related Object", "Related Object Type", "Value-Based Content", "Value-Based Content (Specialized)", "Other")) {
    $keys = MPFT::type_keys();
    
    $tbc = array();
    
    foreach ($keys as $key) {
      MPFT::incl($key);
      $type_class = MPU::type_class($key);
      
      if (class_exists($type_class)) {
        $category = call_user_func( array($type_class, "__category") );
        $tbc[$category][] = $key;
      }
    }

    $types_by_category = array();
    
    foreach ($order as $key) {
      if (isset($tbc[$key])) {
        $types_by_category[$key] = $tbc[$key];
      }
    }
    
    return $types_by_category;
  }