Welcome, Guest
Username: Password: Remember me

TOPIC: Empty Task / Empty Filters

Empty Task / Empty Filters 08 Aug 2016 19:14 #14390

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 16
Could the component builder be tweaked to include empty custom tasks and filters

For controller create an icon on the task bar, choose its label, and the builder will create an empty function in the controller ready, and create a default icon ready for swapping
public function customTask($key = null, $urlVar = null)
    {

        CkJSession::checkToken() or CkJSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));
        //Check the ACLs
        $model = $this->getModel();
        $item = $model->getItem();
        $result = false;
    }

For filters, it will create an empty filter of any type currently defined (combo, string) and then will define the empty filter class, and the WHERE stetment in the model but just propegate it with something like
//WHERE - CUSTOMSEARCH : search_customsearc1h
        $search_customsearch = $this->getState('search.customsearch');
        if (($search_customsearch != '') 
            $this->addWhere('0=0');

or something like that so the placeholder is in place ready for forking (and also therefore when you introduce custom tasks and filters proper)


The code examples are naff, but it would just be nice to have something in place in the builder ready for building on
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Empty Task / Empty Filters 09 Aug 2016 10:25 #14399

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Custom Task is already in the list.

Custom filter is a good idea. For the SQL statement it would be possible to set in in the builder, but not available in the sandbox (too dangerous)
I add it to the list of features.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: jamaza
Time to create page: 0.091 seconds

Get Started