Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | List of all members
UserPersonalisationAttribute Class Reference

Public Member Functions

 tableName ()
 rules ()
 relations ()
 attributeLabels ()
 search ()

Static Public Member Functions

static model ($className=__CLASS__)

Detailed Description

Definition at line 18 of file UserPersonalisationAttribute.php.

Member Function Documentation

UserPersonalisationAttribute::attributeLabels ( )

Returns customized attribute labels (name=>label)

Returns
array

Definition at line 80 of file UserPersonalisationAttribute.php.

{
return array(
'user_id' => 'User',
'personalisation_attribute_id' => 'Personalisation Attribute',
);
}
static UserPersonalisationAttribute::model (   $className = __CLASS__)
static

Returns the static model of the specified AR class.

Parameters
string$classNameactive record class name.
Returns
UserPersonalisationAttribute the static model class

Definition at line 27 of file UserPersonalisationAttribute.php.

Referenced by ManageController\actionUpdateUserAttribute().

{
return parent::model($className);
}
UserPersonalisationAttribute::relations ( )

Returns relational rules.

Returns
array

Definition at line 65 of file UserPersonalisationAttribute.php.

{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'user' => array(self::BELONGS_TO, 'User', 'user_id'),
'personalisationAttribute' => array(self::BELONGS_TO, 'PersonalisationAttribute', array('personalisation_attribute_id' => 'id'))
);
}
UserPersonalisationAttribute::rules ( )

Returns validation rules for model attributes.

Returns
array

Definition at line 47 of file UserPersonalisationAttribute.php.

{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('user_id, personalisation_attribute_id', 'required'),
array('user_id, personalisation_attribute_id', 'numerical', 'integerOnly' => true),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('user_id, personalisation_attribute_id', 'safe', 'on' => 'search'),
);
}
UserPersonalisationAttribute::search ( )

Retrieves a list of models based on the current search/filter conditions.

Returns
CActiveDataProvider the data provider that can return the models based on the search/filter conditions.

Definition at line 93 of file UserPersonalisationAttribute.php.

{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria = new CDbCriteria;
$criteria->compare('user_id', $this->user_id);
$criteria->compare('personalisation_attribute_id', $this->personalisation_attribute_id);
return new CActiveDataProvider(
$this,
array(
'criteria' => $criteria,
)
);
}
UserPersonalisationAttribute::tableName ( )

Returns the associated database table name

Returns
string

Definition at line 37 of file UserPersonalisationAttribute.php.

{
return '{{user_personalisation_attributes}}';
}

The documentation for this class was generated from the following file: