[ Index ] |
PHP Cross Reference of ACL Module |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * The Node for path materialization 5 * 6 * @author dispy <dispyfree@googlemail.com> 7 * @license LGPLv2 8 * @package acl.strategies.nestedSet.pathMaterialiization 9 */ 10 class PmAroNode extends PmAclNode{ 11 /** 12 * Returns the static model of the specified AR class. 13 * @param string $className active record class name. 14 * @return Permission the static model class 15 */ 16 public static function model($className=__CLASS__) 17 { 18 return parent::model($className); 19 } 20 21 /** 22 * @return string the associated database table name 23 */ 24 public function tableName() 25 { 26 return '{{aro}}'; 27 } 28 29 /** 30 * @return array validation rules for model attributes. 31 */ 32 public function rules() 33 { 34 // NOTE: you should only define rules for those attributes that 35 // will receive user inputs. 36 return array( 37 ); 38 } 39 40 /** 41 * @return array customized attribute labels (name=>label) 42 */ 43 public function attributeLabels() 44 { 45 return array( 46 'id' => 'ID', 47 'collection_id' => 'Collection Id', 48 'path' => 'path', 49 ); 50 } 51 52 /** 53 * @return array relational rules. 54 */ 55 public function relations() 56 { 57 // NOTE: you may need to adjust the relation name and the related 58 // class name for the relations automatically generated below. 59 return array( 60 'aro' => array(static::BELONGS_TO, 'PmAro', 'collection_id'), 61 'permissions' => array(static::HAS_MANY, 'Permission', 'aro_id') 62 ); 63 } 64 } 65 66 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jul 1 19:24:45 2012 | Cross-referenced by PHPXref 0.7.1 |