/**
  * Create a new LinkCategory
  * @param int $id
  * @param string $title
  * @param string $description
  */
 function __construct($id, $title, $description, $display_order)
 {
     parent::__construct($id, RESOURCE_LINKCATEGORY);
     $this->title = $title;
     $this->description = $description;
     $this->display_order = $display_order;
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $this->title = new \phpws2\Variable\TextOnly(null, 'title');
     $this->title->allowEmpty(false);
     $this->active = new \phpws2\Variable\Bool(true, 'active');
 }
 public function __construct()
 {
     parent::__construct();
     $this->display_name = new \Variable\TextOnly(null, 'display_name');
     $this->description = new \Variable\TextOnly(null, 'description');
     $this->active = new \Variable\Integer(1, 'active');
 }
Beispiel #4
0
 public function __construct()
 {
     parent::__construct('token');
     $this->reg_method('GET', 'GET_token');
     $this->reg_json_method('POST', 'POST_token', ['password' => 's']);
     $this->reg_json_method('DELETE', 'DELETE_token', ['token' => 's']);
 }
Beispiel #5
0
 public function __construct()
 {
     parent::__construct();
     $this->device_id = new \Variable\Integer(0, 'device_id');
     $this->primary_monitor = new \Variable\TextOnly(null, 'primary_monitor');
     $this->primary_monitor->allowNull(true);
     $this->secondary_monitor = new \Variable\TextOnly(null, 'secondary_monitor');
     $this->secondary_monitor->allowNull(true);
     $this->video_card = new \Variable\TextOnly(null, 'video_card');
     $this->video_card->allowNull(true);
     $this->os = new \Variable\TextOnly(null, 'os');
     $this->os->allowNull(true);
     $this->server_type = new \Variable\TextOnly(null, 'server_type');
     $this->server_type->allowNull(true);
     $this->system_usage = new \Variable\Integer(0, 'system_usage');
     $this->system_usage->allowNull(true);
     $this->battery_backup = new \Variable\Bool(false, 'battery_backup');
     $this->redundant_backup = new \Variable\Bool(false, 'redundant_backup');
     $this->rotation = new \Variable\Bool(false, 'rotation');
     $this->stand = new \Variable\Bool(false, 'stand');
     $this->touch_screen = new \Variable\Bool(false, 'touch_screen');
     $this->dual_monitor = new \Variable\Bool(false, 'dual_monitor');
     $this->check_in = new \Variable\Bool(false, 'check_in');
     $this->smart_room = new \Variable\Bool(false, 'smart_room');
 }
 /**
  * Create a new course description
  * @param int $id
  * @param string $title
  * @param string $content
  */
 public function __construct($id, $title, $content, $description_type)
 {
     parent::__construct($id, RESOURCE_COURSEDESCRIPTION);
     $this->title = $title;
     $this->content = $content;
     $this->description_type = $description_type;
 }
 /**
  * Create a new Glossary
  * @param int $id
  * @param string $name
  * @param string $description
  * @param int $display_order
  */
 public function __construct($id, $name, $description, $display_order)
 {
     parent::__construct($id, RESOURCE_GLOSSARY);
     $this->glossary_id = $id;
     $this->name = $name;
     $this->description = $description;
     $this->display_order = $display_order;
 }
Beispiel #8
0
 public function __construct($clientId, $body = false)
 {
     if ($body && $body->data) {
         $this->data = $body->data;
         unset($body->data);
     }
     parent::__construct($clientId, $body);
 }
 /**
  * Create a new SurveyInvitation
  * @param	int	 $id
  * @param string $code
  * @param string $user
  * @param string $invitation_code
  * @param string $invitation_date
  * @param string $reminder_date
  */
 public function __construct($id, $code, $user, $invitation_code, $invitation_date, $reminder_date)
 {
     parent::__construct($id, RESOURCE_SURVEYINVITATION);
     $this->code = $code;
     $this->user = $user;
     $this->invitation_code = $invitation_code;
     $this->invitation_date = $invitation_date;
     $this->reminder_date = $reminder_date;
 }
Beispiel #10
0
 /**
  * Create a new Link
  * @param int $id The id of this link in the Chamilo-course
  * @param string $title
  * @param string $url
  * @param string $description
  */
 public function __construct($id, $title, $url, $description, $category_id, $on_homepage)
 {
     parent::__construct($id, RESOURCE_LINK);
     $this->title = $title;
     $this->url = $url;
     $this->description = $description;
     $this->category_id = $category_id;
     $this->on_homepage = $on_homepage;
 }
Beispiel #11
0
 public function __construct()
 {
     parent::__construct();
     $this->device_id = new \Variable\Integer(0, 'device_id');
     $this->generation = new \Variable\TextOnly(null, 'generation');
     $this->generation->allowNull(true);
     $this->apple_id = new \Variable\TextOnly(null, 'apple_id');
     $this->apple_id->allowNull(true);
 }
Beispiel #12
0
 function __construct()
 {
     parent::__construct();
     $this->restype = 'computer';
     $this->restypename = 'Computer';
     $this->namefield = 'hostname';
     $this->defaultGetDataArgs = array('sort' => 0, 'includedeleted' => 0, 'rscid' => '');
     $this->basecdata['obj'] = $this;
 }
 /**
  * Create a new Document
  * @param int $id
  * @param string $path
  * @param string $comment
  * @param string $title
  * @param string $file_type (DOCUMENT or FOLDER);
  * @param int $size
  */
 public function __construct($id, $path, $comment, $title, $file_type, $size)
 {
     parent::__construct($id, RESOURCE_DOCUMENT);
     $this->path = 'document' . $path;
     $this->comment = $comment;
     $this->title = $title;
     $this->file_type = $file_type;
     $this->size = $size;
 }
Beispiel #14
0
 public function __construct()
 {
     parent::__construct();
     $this->lot_id = new \phpws2\Variable\Integer(null, 'lot_id');
     $this->number = new \phpws2\Variable\Integer(null, 'number');
     $this->reserved = new \phpws2\Variable\Bool(false, 'reserved');
     $this->sober = new \phpws2\Variable\Bool(false, 'sober');
     $this->active = new \phpws2\Variable\Bool(true, 'active');
 }
Beispiel #15
0
 function __construct()
 {
     parent::__construct();
     $this->restype = 'config';
     $this->restypename = 'Config';
     $this->namefield = 'name';
     $this->defaultGetDataArgs = array('rscid' => 0, 'includedeleted' => 0);
     $this->basecdata['obj'] = $this;
 }
 public function __construct()
 {
     parent::__construct();
     $this->device_id = new \Variable\Integer(0, 'device_id');
     $this->toner_cartridge = new \Variable\TextOnly(NULL, 'toner_cartridge');
     $this->color = new \Variable\Bool(false, 'color');
     $this->network = new \Variable\Bool(false, 'network');
     $this->duplex = new \Variable\Bool(false, 'duplex');
 }
Beispiel #17
0
 function __construct()
 {
     parent::__construct();
     $this->restype = 'schedule';
     $this->restypename = 'Schedule';
     $this->namefield = 'name';
     $this->basecdata['obj'] = $this;
     $this->deletable = 1;
     $this->deletetoggled = 0;
 }
 public function __construct()
 {
     parent::__construct();
     $this->device_id = new \Variable\Integer(0, 'device_id');
     $this->screen_size = new \Variable\TextOnly(null, 'screen_size');
     $this->screen_size->allowNull(true);
     $this->screen_manufacturer = new \Variable\TextOnly(null, 'screen_manufacturer');
     $this->screen_manufacturer->allowNull(true);
     $this->hi_def = new \Variable\Bool(false, 'hi_def');
 }
Beispiel #19
0
 public function __construct()
 {
     parent::__construct(new \Model\Post());
     // setup delete cascade
     $this->resource->onerase(function ($self) {
         // erase comment references
         $comments = new \Model\Comment();
         $comments->erase(array('post = ?', $self->_id));
         return true;
     });
 }
Beispiel #20
0
 public function __construct()
 {
     parent::__construct();
     $this->device_id = new \Variable\Integer(0, 'device_id');
     $this->megapixels = new \Variable\TextOnly(null, 'megapixels');
     $this->megapixels->allowNull(true);
     $this->sd_support = new \Variable\Bool(false, 'sd_support');
     $this->hi_def = new \Variable\Bool(false, 'hi_def');
     $this->exterior = new \Variable\Bool(false, 'exterior');
     $this->covert = new \Variable\Bool(false, 'covert');
     $this->is_on = new \Variable\Bool(false, 'is_on');
 }
Beispiel #21
0
 public function __construct()
 {
     $this->id = new Variable\Integer(0, 'id');
     $this->class_name = new Variable\Attribute(null, 'class_name');
     $this->resource_id = new Variable\Integer(null, 'resource_id');
     $this->action = new Variable\String(null, 'action');
     $this->datestamp = new Variable\Datetime(null, 'datestamp');
     $this->user_id = new Variable\Integer(null, 'user_id');
     $this->ip_address = new Variable\Ip(null, 'ip_address');
     $this->datestamp->stamp();
     parent::__construct();
 }
Beispiel #22
0
 /**
  * Create a new Event
  * @param int $id
  * @param string $title
  * @param string $content
  * @param string $date
  * @param string $hour
  * @param int $duration
  */
 public function __construct($id, $title, $content, $start_date, $end_date, $attachment_path = null, $attachment_filename = null, $attachment_size = null, $attachment_comment = null, $all_day = 0)
 {
     parent::__construct($id, RESOURCE_EVENT);
     $this->title = $title;
     $this->content = $content;
     $this->start_date = $start_date;
     $this->end_date = $end_date;
     $this->all_day = $all_day;
     $this->attachment_path = $attachment_path;
     $this->attachment_filename = $attachment_filename;
     $this->attachment_size = $attachment_size;
     $this->attachment_comment = $attachment_comment;
 }
 /**
  * Create a new announcement
  * @param int $id
  * @param string $title
  * @param string $content
  * @param string $date
  * @param int display_order
  */
 function __construct($id, $title, $content, $date, $display_order, $email_sent, $path, $filename, $size, $comment)
 {
     parent::__construct($id, RESOURCE_ANNOUNCEMENT);
     $this->content = $content;
     $this->title = $title;
     $this->date = $date;
     $this->display_order = $display_order;
     $this->email_sent = $email_sent;
     $this->attachment_path = $path;
     $this->attachment_filename = $filename;
     $this->attachment_size = $size;
     $this->attachment_comment = $comment;
 }
Beispiel #24
0
 public function __construct()
 {
     parent::__construct();
     $this->university = new \phpws2\Variable\CanopyString(null, 'university');
     $this->university->allowEmpty(false);
     $this->university->setLimit(100);
     $this->mascot = new \phpws2\Variable\CanopyString(null, 'mascot');
     $this->mascot->allowEmpty(false);
     $this->mascot->setLimit(100);
     $this->active = new \phpws2\Variable\Bool(true, 'active');
     $this->image = new \phpws2\Variable\File(null, 'image');
     $this->image->allowNull(true);
 }
Beispiel #25
0
 function __construct()
 {
     parent::__construct();
     $this->restype = 'image';
     $this->restypename = 'Image';
     $this->namefield = 'prettyname';
     $this->hasmapping = 1;
     $this->maptype = 'computer';
     $this->maptypename = 'Computer';
     $this->defaultGetDataArgs = array('includedeleted' => 0, 'rscid' => 0);
     $this->basecdata['obj'] = $this;
     $this->addable = 0;
 }
 /**
  * Create a new SurveyQuestion
  * @param int	 $id
  * @param int 	 $survey_id
  * @param string $survey_question
  * @param string $survey_question_comment
  * @param string $type
  * @param string $display
  * @param int	 $sort
  * @param int	 $shared_question_id
  * @param int	 $max_value
  */
 function __construct($id, $survey_id, $survey_question, $survey_question_comment, $type, $display, $sort, $shared_question_id, $max_value)
 {
     parent::__construct($id, RESOURCE_SURVEYQUESTION);
     $this->survey_id = $survey_id;
     $this->survey_question = $survey_question;
     $this->survey_question_comment = $survey_question_comment;
     $this->survey_question_type = $type;
     $this->display = $display;
     $this->sort = $sort;
     $this->shared_question_id = $shared_question_id;
     $this->max_value = $max_value;
     $this->answers = array();
 }
Beispiel #27
0
    public function __construct(array $data) {
        if (!array_key_exists('items', $data)) {
            $items = $data;
        } else {
            $items = $data['items'];

            $this->extras_columns['limit'] = $data['limit'];
            $this->extras_columns['page'] = $data['page'];
            $this->extras_columns['total'] = $data['total'];
        }

        parent::__construct($items);
    }
Beispiel #28
0
 public function __construct($id, $page_id, $reflink, $title, $content, $user_id, $group_id, $timestamp, $progress, $version)
 {
     parent::__construct($id, RESOURCE_WIKI);
     $this->id = $id;
     $this->page_id = $page_id;
     $this->reflink = $reflink;
     $this->title = $title;
     $this->content = $content;
     $this->user_id = $user_id;
     $this->group_id = $group_id;
     $this->dtime = $timestamp;
     $this->progress = $progress;
     $this->version = $version;
 }
Beispiel #29
0
 function __construct()
 {
     global $user;
     parent::__construct();
     $this->restype = 'managementnode';
     $this->restypename = 'Management Node';
     $this->namefield = 'hostname';
     $this->hasmapping = 1;
     $this->maptype = 'computer';
     $this->maptypename = 'Computer';
     $this->defaultGetDataArgs = array('alive' => 'neither', 'includedeleted' => 0, 'rscid' => 0);
     $this->basecdata['obj'] = $this;
     $this->deletetoggled = 1;
 }
 /**
  * Create a new QuizQuestion
  * @param string $question
  * @param string $description
  * @param int $ponderation
  * @param int $type
  * @param int $position
  */
 public function __construct($id, $question, $description, $ponderation, $type, $position, $picture, $level, $extra, $question_category = 0)
 {
     parent::__construct($id, RESOURCE_QUIZQUESTION);
     $this->question = $question;
     $this->description = $description;
     $this->ponderation = $ponderation;
     $this->quiz_type = $type;
     $this->position = $position;
     $this->picture = $picture;
     $this->level = $level;
     $this->answers = array();
     $this->extra = $extra;
     $this->question_category = $question_category;
 }