Exemplo n.º 1
0
 /**
  * @see \CMF\Model\Base::$_plural
  * @return string The plural verbose name for the model (eg. Categories)
  */
 public static function plural()
 {
     $autosave = \Lang::$autosave;
     \Lang::$autosave = false;
     $called_class = get_called_class();
     $output = \Lang::get("admin.models.{$called_class}.plural", array(), "__NOT__FOUND__");
     \Lang::$autosave = $autosave;
     if (empty($output) || $output == "__NOT__FOUND__") {
         if ($called_class::$_plural !== null) {
             return $called_class::$_plural;
         }
         $metadata = $called_class::metadata();
         return \Inflector::pluralize(\Inflector::humanize($metadata->table['name']));
     }
     return $output;
 }