NAMESPACE: Bootstrap/Models

BootstrapModel extends CActiveRecord

public properties
$configobj var Actions configuration as defined in the web admin. All these can be overriden using $this->rewriteActionConfigField()
$vars var Array of currently loaded user variables in name - id pairs. Should be accessed with the methods declared in the Variables trait, not directly. Declared public for easier debugging for certain cases.
$varcontent var Includes currently loaded user variables in array. Normally you would use $this->getSavedVariable instead of accessing this directly. Declared public for easier debugging for certain cases.
$session_storage var
$click_parameters_to_save var
$localizationComponent
$submitvariables var Array containing the submitted variables for a certain request. Submitting a form using a "submit-form-content" action will allow you to access all of the form variables from this array. Usually retrieved with getAllSubmittedVariables() or getSubmittedVariableByName() methods. Should be used in the model for validation and storing.
$actionobj var Array containing the configuration specified in the web admin. Fields can be rewritten using the rewriteActionField() method
$playid var Currently logged in user id
$appid var Current active application id
$userid var Not to be confused with playid, this is installation specific id - the phone on which the app is installed
$router namespace Router object instance. This is the object that instantiates the controller and wires up the view depending on the called route.
$action_id var Id of the action in the web admin
$actionid var Id of the currently active action
$menus var Array containing all of the application menus. An application can have multiple menus defined for different purposes and used in different places in the app - side, top, bottom.
$msgcount var
$bottom_menu_id var Id of the application bottom menu
$branchobj var Configuration array for the branch. Includes all configuration fields defined in the web admin.
$validation_errors array This is a general place for storing validation errors. Usually used from the controller for conditional checks and to display errors.
$permanames var Array consisting of action permanames (slugs) - action id pairs
$rewriteconfigs var
$rewriteactionfield var
$mobilematchingobj namespace The model containing the matching related functionality. Matching is used not only in dating applications but in all other apps that have similar business logic i.e. tenants and properties
$mobilematchingmetaobj var Matching meta model
$bottom_menu_config You can feed following kind of config array for bottom_menu_config $config['flags']['approvals'] = $this->getAdultNotificationCount(); $config['flags']['notifications'] = NotificationsModel::getMyNotificationCount($this->playid); $config['background_color'] = '#ffffff'; $config['text_color'] = '#000000'; $config['hide_text'] = true; $config['flag_color'] = '#3EB439'; $config['flag_text_color'] = '#ffffff';
public function tableName()
public function primaryKey()
public static function model($className)

variable

$className
public function relations()
public function attributeLabels()
public function getConfigParam($param,$default)

Returns a configuration parameter as defined in action’s web configuration panel. You can rewrite any configuration parameters in your action using $this->rewriteActionConfigField(‘fieldname’,’newvalue’); Typical parameters you would use are: backarrow, background_color, hide_menubar, subject, share_title, share_description, share_image, hide_scrollbar, pull_to_refresh, transparent_statusbar

variable

$param
$default
public function getValidationErrors()

Get an array of validation errors. Errors are usually filled in from the model upon form validation.

public function getAllConfigParams()

Returns an associative array of the configuration object.

public function reloadData()

Reloads all variable data and action data

public function localize($string)

Localize a string

variable

$string
public function getCurrentActionPermaname()

Get the active action’s permaname (slug) if it is set

public function getActionidByPermaname($name)

Returns mapping between permanent name & action id

variable

$name
public function rewriteActionConfigField($field,$newcontent)

Rewrite configuration field by key

parameters

$field - backarrow - hide_subject - hide_menubar - background_image_portrait

variable

$field
$newcontent
public function rewriteActionField($field,$newcontent)

Reconfigure any action property

variable

$field
$newcontent
public function getItemId()

This will get the current item id, as triggered initially by menuid. ie. if you use for example open-action with id, you should define id like this: controller/function/$id this id gets saved to session so it will be remembered even though you would have different menu commands inside the same context. It is tied to action_id

public function getMenuId()

Returns the currently called menuid if set

public function getActionId()

Current action id (not the play action, but the actual configuration object id)

public function getValidationError($name)

Return validation error from the array by name

variable

$name
public function setError($string)

Add error in the errors object

variable

$string
public function getRuntimeErrors()

Return errors object

public function flushActionRoutes($actionid,$actionpermaname)

Remove routes from the session

variable

$actionid
$actionpermaname
public function getNextPageId()

Used by infinite scrolling content. So if action is refreshed with this id set, you should return the next batch of content.