Exemple #1
0
 protected function populateState($ordering = null, $direction = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $session = JFactory::getSession();
     $jinput = new Jinput();
     // Adjust the context to support modal layouts.
     if ($layout = $jinput->get('layout')) {
         $this->context .= '.' . $layout;
     }
     $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     $trigger = $this->getUserStateFromRequest($this->context . '.filter.trigger', 'filter_trigger');
     $this->setState('filter.trigger', $trigger);
     $socialtype = $this->getUserStateFromRequest($this->context . '.filter.socialtype', 'filter_socialtype');
     $this->setState('filter.socialtype', $socialtype);
     $socialpost = $this->getUserStateFromRequest($this->context . '.filter.socialpost', 'filter_socialpost');
     $this->setState('filter.socialpost', $socialpost);
     $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
     $this->setState('filter.published', $published);
     $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '');
     $this->setState('filter.language', $language);
     // List state information.
     parent::populateState('m.id', 'asc');
 }
 /**
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  *
  * @return	void
  * @since	1.6
  */
 protected function populateState($ordering = null, $direction = null)
 {
     $app = JFactory::getApplication();
     $session = JFactory::getSession();
     $jinput = new Jinput();
     if ($layout = $jinput->get('layout')) {
         $this->context .= '.' . $layout;
     }
     $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     $connection = $this->getUserStateFromRequest($this->context . '.filter.connection', 'filter_connection');
     $this->setState('filter.connection', $connection);
     $groupId = $this->getUserStateFromRequest($this->context . '.filter.group_id', 'filter_group_id', null, 'int');
     $this->setState('filter.group_id', $groupId);
     $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '');
     $this->setState('filter.language', $language);
     parent::populateState('u.id', 'desc');
 }
Exemple #3
0
 /**
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  *
  * @return	void
  * @since	1.6
  */
 protected function populateState($ordering = null, $direction = null)
 {
     $app = JFactory::getApplication();
     $session = JFactory::getSession();
     $jinput = new Jinput();
     if ($layout = $jinput->get('layout')) {
         $this->context .= '.' . $layout;
     }
     $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published');
     $this->setState('filter.published', $published);
     $widgettype = $this->getUserStateFromRequest($this->context . '.filter.widgettype', 'filter_widgettype');
     $this->setState('filter.widgettype', $widgettype);
     $params = JComponentHelper::getParams('com_bt_socialconnect');
     $this->setState('params', $params);
     parent::populateState('w.title', 'asc');
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $input = Jinput::all();
     $validation = new SOC\Validate\Answer($input);
     if ($validation->passes()) {
         $answer = new SOC\Create\Answer($input);
         $answer->add();
         return 'Answer created!';
     } else {
         return dd($validation->getErrors());
     }
 }
 function __construct($attributes = null)
 {
     $this->attributes = $attributes ?: \Jinput::all();
 }
Exemple #6
-1
 protected function populateState($ordering = null, $direction = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $session = JFactory::getSession();
     $jinput = new Jinput();
     // Adjust the context to support modal layouts.
     if ($layout = $jinput->get('layout')) {
         $this->context .= '.' . $layout;
     }
     $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published');
     $this->setState('filter.published', $published);
     $fieldtype = $this->getUserStateFromRequest($this->context . '.filter.fieldtype', 'filter_fieldtype', '');
     $this->setState('filter.fieldtype', $fieldtype);
     $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
     $this->setState('filter.access', $access);
     $level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', 0, 'int');
     $this->setState('filter.level', $level);
     $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '');
     $this->setState('filter.language', $language);
     // List state information.
     parent::populateState('u.ordering', 'asc');
 }