예제 #1
0
 /**
  * Returns the list of available custom field backends by listing the class
  * files in the backend directory.
  *
  * @access  public
  * @return  array Associative array of filename => name
  */
 function getBackendList()
 {
     $files = Misc::getFileList(APP_INC_PATH . "custom_field");
     $list = array();
     for ($i = 0; $i < count($files); $i++) {
         // make sure we only list the backends
         if (preg_match('/^class\\.(.*)\\.php$/', $files[$i])) {
             // display a prettyfied backend name in the admin section
             $list[$files[$i]] = Custom_Field::getBackendName($files[$i]);
         }
     }
     return $list;
 }