Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c2a2f9b4a4
Fetching contributors…

Cannot retrieve contributors at this time

88 lines (82 sloc) 2.024 kb
<?php
/**
* Managing User Groups
*
* User Groups are created to set custom layout to selected users.
*
* @category API WRAPPER
* @package OnApp
* @author Lev Bartashevsky
* @copyright (c) 2011 OnApp
* @link http://www.onapp.com/
* @see OnApp
*/
/**
*
* Managing User Groups
*
* The OnApp_UserAdditionalField class uses the following basic methods:
* {@link load}, {@link save}, {@link delete}, and {@link getList}.
*
* For full fields reference and curl request details visit: ( http://help.onapp.com/manual.php?m=2 )
*/
class OnApp_UserGroup extends OnApp {
/**
* root tag used in the API request
*
* @var string
*/
var $_tagRoot = 'user_group';
/**
* alias processing the object data
*
* @var string
*/
var $_resource = 'user_groups';
public function __construct() {
parent::__construct();
$this->className = __CLASS__;
}
/**
* API Fields description
*
* @param string|float $version OnApp API version
* @param string $className current class' name
* @return array
*/
public function initFields( $version = null, $className = '' ) {
switch( $version ) {
case '2.0':
case '2.1':
$this->fields = array(
'label' => array(
ONAPP_FIELD_MAP => '_label',
ONAPP_FIELD_REQUIRED => true,
ONAPP_FIELD_DEFAULT_VALUE => ''
),
'created_at' => array(
ONAPP_FIELD_MAP => '_created_at',
ONAPP_FIELD_TYPE => 'datetime',
ONAPP_FIELD_READ_ONLY => true
),
'updated_at' => array(
ONAPP_FIELD_MAP => '_updated_at',
ONAPP_FIELD_TYPE => 'datetime',
ONAPP_FIELD_READ_ONLY => true
),
'id' => array(
ONAPP_FIELD_MAP => '_id',
ONAPP_FIELD_TYPE => 'integer',
ONAPP_FIELD_READ_ONLY => true,
),
);
break;
case 2.2:
case 2.3:
$this->fields = $this->initFields( 2.1 );
break;
}
parent::initFields( $version, __CLASS__ );
return $this->fields;
}
}
Jump to Line
Something went wrong with that request. Please try again.