Phundament App Class Reference
  • Package
  • Class
  • Tree

Packages

  • bootstrap
    • widgets
      • input
  • Image
  • None
  • p3admin
  • p3extensions
    • behaviors
    • commands
    • components
    • helpers
    • widgets
  • p3media
    • actions
    • controllers
    • models
  • p3pages
    • models
  • p3widgets
    • components
    • models
  • PHP
  • system
    • db
      • ar
    • gii
    • web
      • auth
      • helpers
      • widgets
  • yiiext
    • widgets
      • fancybox
      • lipsum
  • zii
    • widgets
      • grid

Classes

  • BaseP3Page
  • BaseP3PageMeta
  • BaseP3PageTranslation
  • P3Page
  • P3PageMeta
  • P3PagesTreeWidget
  • P3PageTranslation

Class P3Page

This is the model base class for the table "p3_page".

Columns in table "p3_page" available as properties of the model:

CComponent
Extended by CModel implements IteratorAggregate, ArrayAccess
Extended by CActiveRecord
Extended by P3ActiveRecord
Extended by BaseP3Page
Extended by P3Page
Package: p3pages\models
Category: db.ar
Author: Tobias Munk <schmunk@usrbin.de>
Located at phundament/p3pages/models/P3Page.php

Methods summary

public
# get_label( )

Overrides

BaseP3Page::get_label
public static CActiveRecord
# model( string $className = __CLASS__ )

Returns the static model of the specified AR class. The model returned is a static instance of the AR class. It is provided for invoking class-level methods (something similar to static class methods.)

Returns the static model of the specified AR class. The model returned is a static instance of the AR class. It is provided for invoking class-level methods (something similar to static class methods.)

EVERY derived AR class must override this method as follows,

public static function model($className=__CLASS__)
{
    return parent::model($className);
}

Parameters

$className
string
$className active record class name.

Returns

CActiveRecord
active record model instance.

Overrides

BaseP3Page::model
public
# init( )

Initializes this model. This method is invoked when an AR instance is newly created and has its scenario set. You may override this method to provide code that is needed to initialize the model (e.g. setting initial property values.)

Initializes this model. This method is invoked when an AR instance is newly created and has its scenario set. You may override this method to provide code that is needed to initialize the model (e.g. setting initial property values.)

Overrides

CActiveRecord::init
public
# __toString( )
public array
# behaviors( )

Returns

array
model behaviours

Overrides

P3ActiveRecord::behaviors
public array
# rules( )

Returns the validation rules for attributes.

Returns the validation rules for attributes.

This method should be overridden to declare validation rules. Each rule is an array with the following structure:

array('attribute list', 'validator name', 'on'=>'scenario name', ...validation parameters...)
where
  • attribute list: specifies the attributes (separated by commas) to be validated;
  • validator name: specifies the validator to be used. It can be the name of a model class method, the name of a built-in validator, or a validator class (or its path alias). A validation method must have the following signature:
    // $params refers to validation parameters given in the rule
    function validatorName($attribute,$params)
    
    A built-in validator refers to one of the validators declared in CValidator::builtInValidators. And a validator class is a class extending CValidator.
  • on: this specifies the scenarios when the validation rule should be performed. Separate different scenarios with commas. If this option is not set, the rule will be applied in any scenario. Please see scenario for more details about this option.
  • additional parameters are used to initialize the corresponding validator properties. Please refer to individal validator class API for possible properties.

The following are some examples:

array(
    array('username', 'required'),
    array('username', 'length', 'min'=>3, 'max'=>12),
    array('password', 'compare', 'compareAttribute'=>'password2', 'on'=>'register'),
    array('password', 'authenticate', 'on'=>'login'),
);

Note, in order to inherit rules defined in the parent class, a child class needs to merge the parent rules with child rules using functions like array_merge().

Returns

array
validation rules to be applied when CModel::validate() is called.

See

scenario

Overrides

BaseP3Page::rules
public
# createUrl( mixed $additionalParams = array(), mixed $absolute = false )
public
# isActive( )
public
# isActiveParent( mixed $model = null )
public static
# getActivePage( )
public static
# getMenuItems( mixed $rootNode )

Methods inherited from BaseP3Page

attributeLabels(), relations(), search(), tableName()

Methods inherited from P3ActiveRecord

scopes()

Methods inherited from CActiveRecord

__call(), __construct(), __get(), __isset(), __set(), __sleep(), __unset(), addRelatedRecord(), afterDelete(), afterFind(), afterFindInternal(), afterSave(), applyScopes(), attributeNames(), beforeDelete(), beforeFind(), beforeFindInternal(), beforeSave(), cache(), count(), countByAttributes(), countBySql(), defaultScope(), delete(), deleteAll(), deleteAllByAttributes(), deleteByPk(), equals(), exists(), find(), findAll(), findAllByAttributes(), findAllByPk(), findAllBySql(), findByAttributes(), findByPk(), findBySql(), getActiveRelation(), getAttribute(), getAttributeLabel(), getAttributes(), getCommandBuilder(), getDbConnection(), getDbCriteria(), getIsNewRecord(), getMetaData(), getOldPrimaryKey(), getPrimaryKey(), getRelated(), getTableAlias(), getTableSchema(), hasAttribute(), hasRelated(), insert(), instantiate(), offsetExists(), onAfterDelete(), onAfterFind(), onAfterSave(), onBeforeDelete(), onBeforeFind(), onBeforeSave(), populateRecord(), populateRecords(), primaryKey(), query(), refresh(), refreshMetaData(), resetScope(), save(), saveAttributes(), saveCounters(), setAttribute(), setDbCriteria(), setIsNewRecord(), setOldPrimaryKey(), setPrimaryKey(), setTableAlias(), together(), update(), updateAll(), updateByPk(), updateCounters(), with()

Methods inherited from CModel

addError(), addErrors(), afterConstruct(), afterValidate(), beforeValidate(), clearErrors(), createValidators(), generateAttributeLabel(), getError(), getErrors(), getIterator(), getSafeAttributeNames(), getScenario(), getValidatorList(), getValidators(), hasErrors(), isAttributeRequired(), isAttributeSafe(), offsetGet(), offsetSet(), offsetUnset(), onAfterConstruct(), onAfterValidate(), onBeforeValidate(), onUnsafeAttribute(), setAttributes(), setScenario(), unsetAttributes(), validate()

Methods inherited from CComponent

asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()

Magic methods summary

Constants summary

string PAGE_ID_KEY 'pageId'
#
string PAGE_NAME_KEY 'pageName'
#

Constants inherited from CActiveRecord

BELONGS_TO, HAS_MANY, HAS_ONE, MANY_MANY, STAT

Properties summary

Properties inherited from CActiveRecord

$db

Magic properties inherited from BaseP3Page

$id, $layout, $p3PageMeta, $route, $view

Magic properties inherited from CActiveRecord

$attributes, $commandBuilder, $dbConnection, $dbCriteria, $isNewRecord, $metaData, $oldPrimaryKey, $primaryKey, $tableAlias, $tableSchema

Magic properties inherited from CModel

$errors, $iterator, $safeAttributeNames, $scenario, $validatorList, $validators

Phundament App Class Reference API documentation generated by ApiGen 2.8.0