Exemplo n.º 1
0
 public function __construct(Database $database, Collection $collection, Container $container, User $user)
 {
     //Constr the parent controller.
     parent::__construct($database, $collection, $container, $user);
     //"label"=>"","datatype"=>"","charsize"=>"" , "default"=>"", "index"=>TRUE, "allowempty"=>FALSE
     //"lets add some more user fields to the post table."
     $this->extendPropertyModel(array("media_participants" => array("Post Participants", "mediumint", 10)), "media");
 }
Exemplo n.º 2
0
 /**
  * Defines the attachment properties
  *
  * @return void
  */
 public function __construct(Database $database, Collection $collection, Container $container, User $user)
 {
     parent::__construct($database, $collection, $container, $user);
     $this->collection = $collection;
     $this->input = $container->input;
     //"label"=>"","datatype"=>"","charsize"=>"" , "default"=>"", "index"=>TRUE, "allowempty"=>FALSE
     $this->extendPropertyModel(array("attachment_name" => array("Attachment Name", "mediumtext", 50), "attachment_title" => array("Attachment Title", "mediumtext", 100), "attachment_size" => array("Attachment Size (bytes)", "mediumint", 50), "attachment_src" => array("Attachment Source", "mediumtext", 100), "attachment_ext" => array("Attachment Extension", "mediumtext", 10), "attachment_owner" => array("Attachment Owner user_name_id", "mediumtext", 100), "attachment_type" => array("Attachment Content Type", "mediumtext", 100)), "attachment");
     //$this->definePropertyModel( $dataModel ); use this to set a new data models or use extendPropertyModel to extend existing models
     $this->defineValueGroup("attachment");
     //Tell the system we are using a proxy table
 }
Exemplo n.º 3
0
 public function __construct(Database $database, Collection $collection, Container $application, User $user)
 {
     $this->encryptor = $application->encrypt;
     $this->config = $application->config;
     $this->database = $database;
     parent::__construct($database, $collection, $application, $user);
     //$this->definePropertyModel( $dataModel ); use this to set a new data models
     $this->defineValueGroup("page");
     //Tell the system we are using a proxy table
     //Pagination
     $currentpage = $application->input->getInt("page", "1", "attribute");
     $this->setState("currentpage", (int) $currentpage);
 }