コード例 #1
0
 /**
  * Returns true if the passed model name is taggable
  *
  * @param      mixed     $model
  * @return     boolean
  */
 public static function isTaggable($model)
 {
     if (!Doctrine::isValidModelClass($model)) {
         throw new Exception(sprintf('%s is not a doctrine class...', $model));
     }
     if (is_string($model)) {
         $table = Doctrine::getTable($model);
     }
     if (is_object($model)) {
         $table = $model->getTable();
     }
     return $table->hasTemplate('Taggable');
 }