Looks like Task comes from:
http://api.joomla.org/Joomla-Platform/Application/JController.html#$task
Doesn't it?
Kind regards,
Nick
> Hi Foysal,
>
> I think the 'task' in your example doesn't come from anywhere, and is void
> in this case. "getCmd('task')" is added in that part of the tutorial for
> future use, e.g. when there really is a task to perform. It is most
> commonly used in the backend of a component, where you can find it in the
> toolbar. Further on in the tutorial you are following, you will see
> examples.
> You can test it yourself by making a form in the frontend, and adding a
> hidden field with: " name="task" value="do_something" ".
>
> 2012/7/15 nowphp <
now...@gmail.com>
>
>> Dear Mohamed Akram
>>
>> Thanks for reply. I am following this tutorial
http://docs.joomla.org/**
>> Developing_a_Model-View-Control**ler_%28MVC%29_Component_for_Jo**
>> omla!2.5_-_Part_02<
http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla%212.5_-_Part_02>
>>
>> I got a line of code there
>> $controller->execute($input->g**etCmd('task'));
>>
>> Can you say where is the origin of 'task' here ??
>> Thanks
>>
>> Foysal
>>
>>
>> On Sunday, 15 July 2012 10:41:19 UTC+6, Mohamed Akram wrote:
>>>
>>> The Jrequst::getCmd, is way of getting data from a php Hash (POST,GET)
>>> etc...,
>>> There are more than 6 nor 7 method of JRequest , The base method of
>>> this
>>> is JRequest getVar,
>>>
>>> In php when a form submit happen, if the the form method is POST, How
>>> we
>>> get the data in php is, $_POST['name'], but in joomla environment, we
>>> can
>>> get the same thing using JRequest::getVar('name') method, but other
>>> methods
>>> are jrequest::getInt, jrequest::getString,jrequest::**getWord,
>>> jrequest::getCmd(), etc.., are getting the post data in a specific
>>> filteration......
>>>
>>>
>>>
>>>
>>> On Sun, Jul 15, 2012 at 8:24 AM, Nick Savov
>>> <
ni...@iowawebcompany.com>wrote:
>>>
>>>> Hi Foysal,
>>>>
>>>> Check out:
>>>>
http://api.joomla.org/Joomla-**Platform/Application/**
>>>> JController.html#$task<
http://api.joomla.org/Joomla-Platform/Application/JController.html#$task>
>>>>
>>>> If you're wanting to know more of the "whys" you should check out the
>>>> following Joomla Programming book:
>>>>
http://www.amazon.com/Joomla-**Programming-Press-Mark-Dexter/**
>>>> dp/013278081X/ref=sr_1_1?ie=**UTF8&qid=1342320678&sr=8-1&**
>>>> keywords=joomla+development<
http://www.amazon.com/Joomla-Programming-Press-Mark-Dexter/dp/013278081X/ref=sr_1_1?ie=UTF8&qid=1342320678&sr=8-1&keywords=joomla+development>
>>>>
>>>> Hope this helps!
>>>>
>>>> Kind regards,
>>>> Nick
>>>>
>>>> > Dear Rouven We�ling,
>>>> >>>
http://docs.joomla.org/API15:**JRequest/getCmd<
http://docs.joomla.org/API15:JRequest/getCmd>
>>>> >>>
http://docs.joomla.org/Secure_**coding_guidelines<
http://docs.joomla.org/Secure_coding_guidelines>
>>>> >>>
>>>> >>> Kind regards,
>>>> >>> Nick
>>>> >>>
>>>> >>> > Dear Nick Savov,
>>>> >>> >
>>>> >>> > Thanks for reply. Actually I am new in joomla programming. I
>>>> know
>>>> >>> > codeigniter.
>>>> >>> > Now I would like to have some joomla mvc programming.
>>>> >>> > What is the meaning of getCmd('task') ??
>>>> >>> >
>>>> >>> > Thanks
>>>> >>> >
>>>> >>> > Foysal
>>>> >>> >
>>>> >>> > On Saturday, 14 July 2012 22:51:27 UTC+6, Nick Savov wrote:
>>>> >>> >>
>>>> >>> >> Hi Foysal,
>>>> >>> >>
>>>> >>> >> I'm new to this so please pardon me if I'm not 100% accurate.
>>>> >>> >>
>>>> >>> >> The first line creates the JInput object. Checkout the
>>>> following
>>>> >>> doc:
>>>> >>> >>
http://docs.joomla.org/JInput_**Background_for_Joomla_Platform<
http://docs.joomla.org/JInput_Background_for_Joomla_Platform>
>>>> >>> >>
>>>> >>> >> The second line executes the task.
>>>> >>> >>
>>>> >>> >> Kind regards,
>>>> >>> >> Nick
>>>> >>> >>
>>>> >>> >>
>>>> >>> >> > I am new in Joomla. I am trying to develop a component in
>>>> Joomla
>>>> >>> >> 2.5.6.
>>>> >>> >> >
>>>> >>> >> > $input = JFactory::getApplication()->**input;
>>>> >>> >> > $controller->execute($input->**getCmd('task'));
>>>> >>> >> >
>>>> >>> >> > What is the meaning of these two lines ??
>>>> >>> >> >
>>>> >>> >> > Thanks
>>>> >>> >> >
>>>> >>> >> > Foysal
>>>> >>> >> >
>>>> >>> >> > --
>>>> >>> >> > You received this message because you are subscribed to the
>>>> Google
>>>> >>> >> Groups
>>>> >>> >> > "Joomla! General Development" group.
>>>> >>> >> > To view this discussion on the web, visit
>>>> >>> >> >
https://groups.google.com/d/**msg/joomla-dev-general/-/**
>>>> 80BVlonNIHEJ<
https://groups.google.com/d/msg/joomla-dev-general/-/80BVlonNIHEJ>
>>>> .
>>>> >>> >> > To post to this group, send an email to
>>>> >>> >> > joomla-dev-general@**
googlegroups.com<
joomla-de...@googlegroups.com>
>>>> .
>>>> >>> >> > To unsubscribe from this group, send email to
>>>> >>> >> > joomla-dev-general+**
unsub...@googlegroups.com<
joomla-dev-general%2Bunsu...@googlegroups.com>
>>>> .
>>>> >>> >> > For more options, visit this group at
>>>> >>> >> >
http://groups.google.com/**group/joomla-dev-general?hl=**en-GB<
http://groups.google.com/group/joomla-dev-general?hl=en-GB>
>>>> .
>>>> >>> >> >
>>>> >>> >> >
>>>> >>> >>
>>>> >>> >
>>>> >>> > --
>>>> >>> > You received this message because you are subscribed to the
>>>> Google
>>>> >>> Groups
>>>> >>> > "Joomla! General Development" group.
>>>> >>> > To view this discussion on the web, visit
>>>> >>> >
https://groups.google.com/d/**msg/joomla-dev-general/-/**
>>>> pLU4NuTGAM4J<
https://groups.google.com/d/msg/joomla-dev-general/-/pLU4NuTGAM4J>
>>>> .
>>>> >>> > To post to this group, send an email to
>>>> >>> > joomla-dev-general@**
googlegroups.com<
joomla-de...@googlegroups.com>
>>>> .
>>>> >>> > To unsubscribe from this group, send email to
>>>> >>> > joomla-dev-general+**
unsub...@googlegroups.com<
joomla-dev-general%2Bunsu...@googlegroups.com>
>>>> .
>>>> >>> > For more options, visit this group at
>>>> >>> >
http://groups.google.com/**group/joomla-dev-general?hl=**en-GB<
http://groups.google.com/group/joomla-dev-general?hl=en-GB>
>>>> .
>>>> >>> >
>>>> >>> >
>>>> >>>
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "Joomla! General Development" group.
>>>> >> To view this discussion on the web, visit
>>>> >>
https://groups.google.com/d/**msg/joomla-dev-general/-/**HBxKMwnfUrcJ<
https://groups.google.com/d/msg/joomla-dev-general/-/HBxKMwnfUrcJ>
>>>> .
>>>> >> To post to this group, send an email to
>>>> >> joomla-dev-general@**
googlegroups.com<
joomla-de...@googlegroups.com>
>>>> .
>>>> >> To unsubscribe from this group, send email to
>>>> >> joomla-dev-general+**
unsub...@googlegroups.com<
joomla-dev-general%2Bunsu...@googlegroups.com>
>>>> .
>>>> >> For more options, visit this group at
>>>> >>
http://groups.google.com/**group/joomla-dev-general?hl=**en-GB<
http://groups.google.com/group/joomla-dev-general?hl=en-GB>
>>>> .
>>>> >>
>>>> >>
>>>> >>
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google
>>>> Groups
>>>> > "Joomla! General Development" group.
>>>> > To view this discussion on the web, visit
>>>> >
https://groups.google.com/d/**msg/joomla-dev-general/-/k_**T5MSOIbHAJ<
https://groups.google.com/d/msg/joomla-dev-general/-/k_T5MSOIbHAJ>
>>>> .
>>>> > To post to this group, send an email to
>>>> > joomla-dev-general@**
googlegroups.com<
joomla-de...@googlegroups.com>
>>>> .
>>>> > To unsubscribe from this group, send email to
>>>> > joomla-dev-general+**
unsub...@googlegroups.com<
joomla-dev-general%2Bunsu...@googlegroups.com>
>>>> .
>>>> > For more options, visit this group at
>>>> >
http://groups.google.com/**group/joomla-dev-general?hl=**en-GB<
http://groups.google.com/group/joomla-dev-general?hl=en-GB>
>>>> .
>>>> >
>>>> >
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Joomla! General Development" group.
>>>> To post to this group, send an email to joomla-dev-general@**
>>>>
googlegroups.com <
joomla-de...@googlegroups.com>.
>>>> To unsubscribe from this group, send email to joomla-dev-general+**
>>>>
unsub...@googlegroups.com<
joomla-dev-general%2Bunsu...@googlegroups.com>
>>>> .
>>>> For more options, visit this group at
http://groups.google.com/**
>>>> group/joomla-dev-general?hl=**en-GB<
http://groups.google.com/group/joomla-dev-general?hl=en-GB>
>>>> .
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To post to this group, send an email to