Esempio n. 1
0
 /**
  * Constructor
  *
  * @param   object  An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->_document = $config->document;
     // Set the static states
     $this->_state->insert('limit', 'int', 10)->insert('offset', 'int')->insert('sort', 'cmd')->insert('direction', 'word', 'asc')->insert('search', 'string')->insert('callback', 'cmd')->insert('id', 'string', null, true);
 }
Esempio n. 2
0
    public function __construct(KConfig $config)
    {
        parent::__construct($config);

        $this->_state
             ->insert('name', 'cmd', null, true);        
    }
Esempio n. 3
0
    /**
     * Constructor
     *
     * @param   object  An optional KConfig object with configuration options
     */
    public function __construct(KConfig $config)
    {
        parent::__construct($config);

       $this->_table = $config->table;
      
        // Set the static states
        $this->_state
            ->insert('limit'    , 'int')
            ->insert('offset'   , 'int')
            ->insert('sort'     , 'cmd')
            ->insert('direction', 'word', 'asc')
            ->insert('search'   , 'string')
            // callback state for JSONP, needs to be filtered as cmd to prevent XSS
            ->insert('callback' , 'cmd');

        //Try getting a table object
        if($this->isConnected())
        {
            // Set the dynamic states based on the unique table keys
            foreach($this->getTable()->getUniqueColumns() as $key => $column) {
                $this->_state->insert($key, $column->filter, null, true, $this->getTable()->mapColumns($column->related, true));
            }
        }
    }
Esempio n. 4
0
 /**
  * Constructor
  *
  * @param	array An optional associative array of configuration settings.
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->_state->insert('position', 'cmd')->insert('module', 'cmd')->insert('limit', 'int', 0);
     KLoader::load('lib.joomla.application.module.helper');
     $this->_list =& JModuleHelper::_load();
     $this->_total = count($this->_list);
 }
Esempio n. 5
0
	public function __construct(KConfig $config)
	{
		parent::__construct($config);
	
		$this->_state
			->insert('chapter', 'cmd', 'C1')
			->insert('page', 'cmd', 'default');
	}
Esempio n. 6
0
    public function __construct(KConfig $config)
    {
        parent::__construct($config);

        $this->_state
            ->insert('service'  , 'raw')
            ->insert('url'      , 'raw')
        ;
    }
Esempio n. 7
0
    /**
     * Constructor
     *
     * @param KConfig $config Configuration options
     */
    public function __construct(KConfig $config)
    {
        parent::__construct($config);

        $this->_state
            ->insert('id', 'int', null, true)
            ->insert('alias', 'cmd', null, true)
            ->insert('view', 'cmd');
    }
 /**
  * Constructor
  *
  * @param	array An optional associative array of configuration settings.
  */
 public function __construct(KConfig $options)
 {
     parent::__construct($options);
     KLoader::load('lib.joomla.filesystem.file');
     //$attr = array_diff_key($node->attributes(), array_fill_keys(array('name', 'type', 'default', 'get', 'label', 'description'), null) );
     $this->_state->insert('client', 'boolean', 0)->insert('optgroup', 'string', true)->insert('incpath', 'boolean', 0)->insert('limit', 'int', 0);
     //		$this->_list = array();
     //		$this->_total = count($this->_list);
 }
Esempio n. 9
0
	public function __construct(KConfig $config)
	{
		parent::__construct($config);
	
		$this->_table = $config->table;
		$this->_storage_name = $config->storage_name;
            
        // Insert as id as unique
        $this->_state->insert('id', 'int', null, true);
	}
Esempio n. 10
0
 public function __construct(KConfig $options)
 {
     parent::__construct($options);
     $napi = clone $this->getIdentifier();
     $napi->package = 'ninja';
     $identifier = $this->getIdentifier();
     $this->_state->insert('limit', 'int', 0);
     KFactory::tmp('admin::com.ninja.helper.installer', array('identifier' => $napi));
     KFactory::tmp('admin::com.ninja.helper.installer', array('identifier' => $identifier));
 }
Esempio n. 11
0
    /**
     * Constructor
     *
     * @param KObjectConfig $config Configuration options
     */
    public function __construct(KObjectConfig $config)
    {
        parent::__construct($config);

        $this->getState()
            ->insert('id', 'int', null, true)
            ->insert('alias', 'cmd', null, true)
            ->insert('language', 'cmd', null)
            ->insert('view', 'cmd');
    }
Esempio n. 12
0
    public function __construct(KConfig $config)
	{
		parent::__construct($config);
		
		$this->_state
			->insert('published' ,'int')
			->insert('limit'    , 'int')
            ->insert('offset'   , 'int')
            ->insert('sort'     , 'cmd', 'ordering')
            ->insert('direction', 'word', 'asc');
	}
Esempio n. 13
0
	public function __construct(KConfig $config)
	{
		parent::__construct($config);

		$this->_state
			->insert('limit'      , 'int', 0)
			->insert('offset'     , 'int', 0)
			->insert('direction'  , 'word', 'asc')
			->insert('application', 'cmd', 'site')
			->insert('default'	  , 'boolean', false, true)
			->insert('name'	      , 'com://admin/languages.filter.iso', null, true);
	}
Esempio n. 14
0
	/**
	 * The constructor.
	 * 
	 * @param KConfig $config An optional configuration object.
	 */
	public function __construct(KConfig $config = null)
	{
		parent::__construct($config);
		
		$this->_state
		    ->insert('term'     , 'com://site/search.filter.term')
		    ->insert('match'    , 'cmd', 'all')
		    ->insert('ordering' , 'cmd', 'newest')
		    ->insert('areas'    , 'cmd', null)
		    ->insert('limit'    , 'int', 20)
		    ->insert('offset'   , 'int');
	}
Esempio n. 15
0
  public function __construct(KConfig $config)
  {
      parent::__construct($config);
      
      $this->_state
          ->insert('name'      , 'cmd', null, true)
          ->insert('limit'     , 'int')
          ->insert('offset'    , 'int')
          ->insert('sort'      , 'cmd')
          ->insert('direction' , 'word', 'asc')
          ->insert('search'    , 'string');
 }
Esempio n. 16
0
 /**
  * Constructor
  *
  * @param	array An optional associative array of configuration settings.
  */
 public function __construct(KConfig $options)
 {
     parent::__construct($options);
     $this->_state->insert('limit', 'int', 0);
     foreach (DateTimeZone::listIdentifiers() as $timezone) {
         if ($group != substr($timezone, 0, strpos($timezone, '/'))) {
             $group = substr($timezone, 0, strpos($timezone, '/'));
             $this->_list[] = (object) array('id' => false, 'title' => $group);
         }
         $this->_list[] = (object) array('id' => $timezone, 'title' => $timezone);
     }
     $this->_total = count($this->_list);
 }
Esempio n. 17
0
    /**
     * Constructor
     *
     * @param   object  An optional KConfig object with configuration options
     */
    public function __construct(KConfig $config)
    {
        parent::__construct($config);

        $this->_state
            ->insert('limit'      , 'int')
            ->insert('offset'     , 'int')
            ->insert('sort'       , 'cmd')
            ->insert('direction'  , 'word', 'asc')
            ->insert('application', 'cmd', 'site')
            ->insert('default'    , 'boolean', false, true)
            ->insert('name'       , 'cmd', null, true);        
    }
Esempio n. 18
0
 /**
  * Constructor
  *
  * @param	array An optional associative array of configuration settings.
  */
 public function __construct(KConfig $options)
 {
     parent::__construct($options);
     // set the table associated to the model
     if (isset($options->path)) {
         $this->_path = $options->path;
     } else {
         $package = $this->_identifier->package;
         $this->_path = JPATH_ROOT . DS . 'components' . DS . 'com_' . $package . DS . KInflector::pluralize($this->_identifier->name);
     }
     // Set the state
     $this->_state->insert('id', 'int', 0)->insert('limit', 'int', 20)->insert('offset', 'int', 0)->insert('order', 'cmd')->insert('direction', 'word', 'asc')->insert('search', 'string')->insert('name', 'admin::com.ninja.filter.path');
     return $this;
 }
Esempio n. 19
0
 /**
  * Constructor
  *
  * @param	array An optional associative array of configuration settings.
  */
 public function __construct(array $options = array())
 {
     //set the model dbo
     $this->_db = isset($options['dbo']) ? $options['dbo'] : KFactory::get('lib.joomla.database');
     parent::__construct($options);
     // set the table associated to the model
     if (isset($options['table'])) {
         $this->_table = $options['table'];
     } else {
         $table = KInflector::tableize($this->getClassName('suffix'));
         $component = $this->getClassName('prefix');
         $application = KFactory::get('lib.joomla.application')->getName();
         $this->_table = $application . '::com.' . $component . '.table.' . $table;
     }
 }
Esempio n. 20
0
    public function __construct(KConfig $config)
	{
	    parent::__construct($config);
		
		$this->_state
		    ->insert('name'  , 'cmd')
		    ->insert('hash'  , 'cmd')
		    ->insert('group' , 'url')
		    ->insert('site'  , 'cmd', 'default')
		 	->insert('limit' , 'int')
            ->insert('offset', 'int')
            ->insert('sort'     , 'cmd')
            ->insert('direction', 'word', 'asc')
            ->insert('search'   , 'string');
	}
Esempio n. 21
0
	public function __construct(KConfig $config)
	{
		parent::__construct($config);

		$this->_state
			->insert('limit'    , 'int', KFactory::get('joomla:application')->getCfg('list_limit'))
			->insert('offset'   , 'int', 0)
			->insert('search'	, 'filename')
			->insert('direction', 'word', 'asc')

			->insert('container', 'identifier', null)
			->insert('path'		, 'com://admin/files.filter.path', null, true) // unique
			->insert('folder'	, 'com://admin/files.filter.path', '')
			->insert('types'	, 'cmd', '')
			->insert('editor'   , 'cmd', '') // used in modal windows
			;
	}
Esempio n. 22
0
 /**
  * Constructor
  *
  * @param KObjectConfig $config  An optional KObjectConfig object with configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->_table = $config->table;
     //Calculate the aliases based on the location of the table
     $model = $database = $this->getTable()->getIdentifier()->toArray();
     //Create database.rowset -> model.entity alias
     $database['path'] = array('database', 'rowset');
     $model['path'] = array('model', 'entity');
     $this->getObject('manager')->registerAlias($model, $database);
     //Create database.row -> model.entity alias
     $database['path'] = array('database', 'row');
     $database['name'] = KStringInflector::singularize($database['name']);
     $model['path'] = array('model', 'entity');
     $model['name'] = KStringInflector::singularize($model['name']);
     $this->getObject('manager')->registerAlias($model, $database);
     //Behavior depends on the database. Need to add if after database has been set.
     $this->addBehavior('indexable');
 }
Esempio n. 23
0
 /**
  * Constructor
  *
  * @param   object  An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     if (!empty($config->table)) {
         $this->setTable($config->table);
     }
     // Set the static states
     $this->_state->insert('limit', 'int')->insert('offset', 'int')->insert('sort', 'cmd')->insert('direction', 'word', 'asc')->insert('search', 'string');
     //Try getting a table object
     if ($table = $this->getTable()) {
         //Set the table behaviors
         if (!empty($config->table_behaviors)) {
             $table->addBehaviors($config->table_behaviors);
         }
         // Set the dynamic states based on the unique table keys
         foreach ($table->getUniqueColumns() as $key => $column) {
             $this->_state->insert($key, $column->filter, null, true, $table->mapColumns($column->related, true));
         }
     }
 }
Esempio n. 24
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     //Get a list over the default converters shipping with Ninjaboard
     $exclude = array('abstract.php', 'exception.php', 'interface.php', '.DS_Store');
     $converters = JFolder::files(JPATH_COMPONENT_ADMINISTRATOR . '/databases/converters/', '.', false, false, $exclude);
     foreach ($converters as $name) {
         $name = str_replace('.php', '', $name);
         //Prevent exceptions caused by files like .DS_Store
         try {
             $converter = KFactory::get('admin::com.ninjaboard.database.converters.' . $name);
         } catch (KFactoryException $e) {
             continue;
         }
         if ($converter->canConvert()) {
             $this->_list[$name] = $converter;
         }
     }
     $this->_total = count($this->_list);
     $this->_state->insert('import', 'cmd', 'demo')->insert('limit', 'int');
 }
Esempio n. 25
0
    public function __construct(KObjectConfig $config)
    {
        parent::__construct($config);

        $this->getState()
            ->insert('limit'    , 'int')
            ->insert('offset'   , 'int')
            ->insert('sort'     , 'cmd')
            ->insert('direction', 'word', 'asc')
            ->insert('search'   , 'string')

            ->insert('container', 'com:files.filter.container', null)
            ->insert('folder'	, 'com:files.filter.path', '')
            ->insert('name'		, 'com:files.filter.path', '', true)

            ->insert('types'	, 'cmd', '')
            // used in modal windows
            ->insert('editor'   , 'string', '')
            // used to pass options to the JS application in HMVC, internal
            ->insert('config'   , 'raw', '', false, array(), true);

        $this->addCommandCallback('after.reset', '_afterReset');
    }
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->getState()->insert('codon', 'string');
 }
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->_state->insert('e_name', 'string', null);
 }
Esempio n. 28
0
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->getState()->insert('container', 'identifier', '')->insert('path', 'url', null, true);
 }
Esempio n. 29
0
 /**
  * Constructor
  *
  * @param  KObjectConfig $config    An optional ObjectConfig object with configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->_entity = $this->getObject('lib:model.entity.immutable');
 }
Esempio n. 30
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->_state->insert('package', 'string', null, true)->insert('name', 'string', null, true)->insert('urlset_limit', 'int', null, true)->insert('urlset_offset', 'int', null, true);
 }