[ Index ]

PHP Cross Reference of ACL Module

title

Body

[close]

/components/strategies/nestedSet/pathMaterialization/models/ -> PmAcoNode.php (source)

   1  <?php
   2  
   3  /**

   4   * 

   5   * The Node specializuation for path materialization

   6   *

   7   * @author dispy <dispyfree@googlemail.com>

   8   * @license LGPLv2

   9   * @package acl.strategies.nestedSet.pathMaterialiization

  10   */
  11  class PmAcoNode extends PmAclNode{
  12  
  13      /**

  14       * @return string the associated database table name

  15       */
  16      public function tableName()
  17      {
  18          return '{{aco}}';
  19      }
  20      
  21      /**

  22       * @return array relational rules.

  23       */
  24      public function relations()
  25      {
  26          // NOTE: you may need to adjust the relation name and the related

  27          // class name for the relations automatically generated below.

  28          return array(
  29              'aco' => array(static::BELONGS_TO, 'PmAco', 'collection_id'),
  30              'permissions' => array(static::HAS_MANY, 'Permission',  'aco_id')
  31          );
  32      }
  33       /**

  34       * Returns the static model of the specified AR class.

  35       * @param string $className active record class name.

  36       * @return PM_Aco the static model class

  37       */
  38      public static function model($className=__CLASS__)
  39      {
  40          return parent::model($className);
  41      }
  42  
  43  
  44      /**

  45       * @return array validation rules for model attributes.

  46       */
  47      public function rules()
  48      {
  49          // NOTE: you should only define rules for those attributes that

  50          // will receive user inputs.

  51          return array(
  52          );
  53      }
  54  
  55      /**

  56       * @return array customized attribute labels (name=>label)

  57       */
  58      public function attributeLabels()
  59      {
  60          return array(
  61              'id' => 'ID',
  62              'collection_id' => 'Collection Id',
  63              'path' => 'path',
  64          );
  65      }
  66  }
  67  
  68  ?>


Generated: Sun Jul 1 19:24:45 2012 Cross-referenced by PHPXref 0.7.1