<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ThiagoG</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ThiagoG"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/ThiagoG"/>
	<updated>2026-05-15T20:03:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Basic_form_guide&amp;diff=656935</id>
		<title>Basic form guide</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Basic_form_guide&amp;diff=656935"/>
		<updated>2020-04-04T12:02:32Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: Add J in front of Factory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This is one of a series of [[API Guides]], which aim to help you understand how to use the Joomla APIs through providing detailed explanations and sample code which you can easily install and run.&lt;br /&gt;
&lt;br /&gt;
The Joomla Form class and API enables you to easily develop HTML forms and handle the user&#039;s input. &lt;br /&gt;
&lt;br /&gt;
This page describes how you interact in general with the Joomla Form class and provides the code of a simple component which you can install to demonstrate use of this API. &lt;br /&gt;
&lt;br /&gt;
Joomla itself also has a specific way of designing form functionality, and this page includes tutorial material to help you understand and develop your component to align with these principles.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
The diagram below shows the basic use of the Joomla Form class.&lt;br /&gt;
&lt;br /&gt;
[[File:basicform.jpg|Using Joomla Forms]] &lt;br /&gt;
&lt;br /&gt;
Firstly, you need to define your form in XML using Joomla [[Standard form field types]]. See the component code below for an example. In basic terms, each field element in your XML file maps to an HTML (mostly &amp;quot;input&amp;quot;) element in the form, with the XML field attributes mapping to the (input) element attributes. Many of the possible field attributes are listed in [[Text form field type]].&lt;br /&gt;
&lt;br /&gt;
=== Step 1 Loading the Form ===&lt;br /&gt;
The user clicks on the URL of your form, and Joomla routes the HTTP GET request through to your component code. You need to call &amp;lt;tt&amp;gt;Form::getInstance()&amp;lt;/tt&amp;gt; passing the name of your XML file with your form definition. The Joomla Form code creates a Form instance, and then (in &amp;lt;tt&amp;gt;Form::loadFile()&amp;lt;/tt&amp;gt;) reads the file into memory (as a PHP &amp;lt;tt&amp;gt;SimpleXMLElement&amp;lt;/tt&amp;gt;) and parses the XML to ensure it&#039;s valid. The main parameters passed to &amp;lt;tt&amp;gt;getInstance()&amp;lt;tt&amp;gt; are:&lt;br /&gt;
* name – a string specifying the identity to give to this form – it just needs to be unique, so that it doesn&#039;t clash with any other Joomla forms on the same webpage&lt;br /&gt;
* data – the name of the XML file which has your form definition&lt;br /&gt;
* options – an array of options, with the &amp;quot;control&amp;quot; element specifying the name of the array which the POST parameters will be held in. For example, the sample code has &amp;lt;tt&amp;gt;array(&amp;quot;control&amp;quot;=&amp;gt;&amp;quot;myform&amp;quot;)&amp;lt;/tt&amp;gt; which means that the HTML input elements will have name attributes set to &amp;quot;myform[message]&amp;quot;, &amp;quot;myform[email]&amp;quot;, etc,. They will be passed in POST parameters that way, and it&#039;s then very easy to get these into a PHP array.&lt;br /&gt;
&lt;br /&gt;
=== Step 2 Providing Pre-fill Data ===&lt;br /&gt;
You provide values for any form element you wish. For example, if this form is being used to edit a record in the database, then you would pre-populate it with existing field values from the database. You can provide values by setting up an associative array &amp;lt;tt&amp;gt;$data&amp;lt;/tt&amp;gt; and passing it to &amp;lt;tt&amp;gt;Form::bind($data)&amp;lt;/tt&amp;gt; method, and Joomla Form then stores this data locally within the Form instance.&lt;br /&gt;
&lt;br /&gt;
=== Step 3 Outputting the Form in HTML ===&lt;br /&gt;
You call &amp;lt;tt&amp;gt;renderField(fieldName)&amp;lt;/tt&amp;gt; on the Form instance and you get returned the HTML which you can echo to the output. Joomla processes its XML representation of your form to obtain the section relating to the passed-in fieldName, generates the HTML for this HTML element and includes the &amp;quot;value&amp;quot; attribute based on the pre-populated data which you passed in step 2.&lt;br /&gt;
When outputting the form you also need to surround the input elements in a &amp;lt;tt&amp;gt;&amp;lt;form&amp;gt;&amp;lt;/tt&amp;gt; element and add a submit button. &lt;br /&gt;
&lt;br /&gt;
=== Step 4 User Submitting the Form ===&lt;br /&gt;
The user enters data into your HTML form and clicks on the submit button. The browser generates an HTTP POST request to the URL specified in the &amp;lt;tt&amp;gt;&amp;lt;form&amp;gt;&amp;lt;/tt&amp;gt; element and passes to the server in POST parameters the values entered by the user; each parameter keyed by the &amp;quot;name&amp;quot; attribute of the HTML input element.&lt;br /&gt;
&lt;br /&gt;
Joomla routes this POST through to your component. As this is a new HTTP request the previous Form instance no longer exists, so you have to again call &amp;lt;tt&amp;gt;Form::getInstance()&amp;lt;/tt&amp;gt;, passing the filename of your form XML, and Joomla (as before) creates a Form instance and reads this file into memory.&lt;br /&gt;
&lt;br /&gt;
=== Step 5 Handling the HTTP POST Data ===&lt;br /&gt;
In this step you process the submitted data. This involves:&lt;br /&gt;
# Getting the POST data using &amp;lt;tt&amp;gt;Factory::getApplication-&amp;gt;input-&amp;gt;get()&amp;lt;tt&amp;gt;. Usually the &amp;quot;name&amp;quot; attributes of the input elements are defined so that the POST parameters appear as an array, and you can use the ARRAY filter from [[Retrieving_request_data_using_JInput]] to read these directly into a PHP array. However, this means that the individual elements are not filtered at all. &lt;br /&gt;
# Filtering. This applies filtering on each of the input values. The filter applied to a field is governed by the &amp;quot;filter=...&amp;quot; attribute on that field in your form XML file, or if not present then the default filter will remove HTML tags etc from your data values. The possible filters are in the &amp;lt;tt&amp;gt;filterField()&amp;lt;/tt&amp;gt; method of the Form class (and see https://joomla.stackexchange.com/questions/5764/what-are-possible-filters-in-joomla-form-fields). Note that these form field filters are different from the jinput filters. &lt;br /&gt;
# Validation. You validate the data which the user has entered by calling validate($data) on your Form instance, passing an associative array of the (filtered) user data. Joomla compares the user-entered data with the validation you defined in your form XML file, and generates errors for fields which fail the validation.&lt;br /&gt;
&lt;br /&gt;
If there are validation errors then you should display those errors to the user, and redisplay the form, pre-populating the fields with the (filtered) data which the user entered previously.&lt;br /&gt;
&lt;br /&gt;
If there are no errors then you can confirm this to the user, and show the next web page.&lt;br /&gt;
&lt;br /&gt;
== Sample Form 1 ==&lt;br /&gt;
Below is the code for a small component which you can install to demonstrate basic use of Joomla forms. Place the following 3 files into a folder called &amp;quot;com_sample_form1&amp;quot;. Then zip up the folder to create &amp;lt;tt&amp;gt;com_sample_form1.zip&amp;lt;/tt&amp;gt; and install this as a component on your Joomla instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form1.xml&amp;lt;/tt&amp;gt; Manifest file for the component&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.1.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;com_sample_form1&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Sample form 1&amp;lt;/description&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;sample_form1.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;sample_form.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;sample_form.xml&amp;lt;/tt&amp;gt; File containing the XML for the form definition&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;field&lt;br /&gt;
		name=&amp;quot;message&amp;quot;&lt;br /&gt;
		type=&amp;quot;text&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter message&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;email&amp;quot; &lt;br /&gt;
		type=&amp;quot;email&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter email&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;telephone&amp;quot; &lt;br /&gt;
		type=&amp;quot;tel&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter telephone number&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		validate=&amp;quot;tel&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;sample_form1.php&amp;lt;/tt&amp;gt; Component code.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\Form\Form;&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
$form = Form::getInstance(&amp;quot;sample&amp;quot;, __DIR__ . &amp;quot;/sample_form.xml&amp;quot;, array(&amp;quot;control&amp;quot; =&amp;gt; &amp;quot;myform&amp;quot;));&lt;br /&gt;
$prefillData = array(&amp;quot;email&amp;quot; =&amp;gt; &amp;quot;.@.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if ($_SERVER[&#039;REQUEST_METHOD&#039;] === &#039;POST&#039;) &lt;br /&gt;
{&lt;br /&gt;
	$app   = JFactory::getApplication();&lt;br /&gt;
	$data = $app-&amp;gt;input-&amp;gt;post-&amp;gt;get(&#039;myform&#039;, array(), &amp;quot;array&amp;quot;);&lt;br /&gt;
	echo &amp;quot;Message was &amp;quot; . $data[&amp;quot;message&amp;quot;] . &lt;br /&gt;
		&amp;quot;, email was &amp;quot; . $data[&amp;quot;email&amp;quot;] . &lt;br /&gt;
		&amp;quot;, and telephone was &amp;quot; . $data[&amp;quot;telephone&amp;quot;] . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
	$filteredData = $form-&amp;gt;filter($data);&lt;br /&gt;
	$result = $form-&amp;gt;validate($filteredData);&lt;br /&gt;
	if ($result)&lt;br /&gt;
	{&lt;br /&gt;
		echo &amp;quot;Validation passed ok&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		echo &amp;quot;Validation failed&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
		$errors = $form-&amp;gt;getErrors();&lt;br /&gt;
		foreach ($errors as $error)&lt;br /&gt;
		{&lt;br /&gt;
			echo $error-&amp;gt;getMessage() . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		// in the redisplayed form show what the user entered (after data is filtered)&lt;br /&gt;
		$prefillData = $filteredData;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$form-&amp;gt;bind($prefillData);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_sample_form1&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;sampleForm&amp;quot; id=&amp;quot;adminForm&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;?php echo $form-&amp;gt;renderField(&#039;message&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $form-&amp;gt;renderField(&#039;email&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $form-&amp;gt;renderField(&#039;telephone&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;button type=&amp;quot;submit&amp;quot;&amp;gt;Submit&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once installed navigate to your site and add the following parameter to the URL: &lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;amp;option=com_sample_form1&amp;lt;tt&amp;gt;. You should then see the form displayed with 3 required fields:&lt;br /&gt;
* a general text input field for a message&lt;br /&gt;
* an email input field, pre-populated with the string &amp;quot;.@.&amp;quot;&lt;br /&gt;
* a telephone number input field.&lt;br /&gt;
and using your browser&#039;s development tools you can compare the html attributes with the attributes in your XML form definition. &lt;br /&gt;
&lt;br /&gt;
Note that modern browsers will do some validation on the values you enter, specifically they will validate the email address and will force you to enter something into fields with the &amp;quot;required&amp;quot; attribute set, but don&#039;t (currently) do validation on telephone number fields.&lt;br /&gt;
&lt;br /&gt;
Once you enter valid data into the fields and press Submit, then the data will be sent to the server and the POST leg of the sample code will be run. This runs the filtering and validation routines. If there are validation errors then the code outputs the error messages, and prefills the form with the data which the user entered before redisplaying it.&lt;br /&gt;
&lt;br /&gt;
== MVC and other considerations ==&lt;br /&gt;
The way that the code above is written isn&#039;t the best approach if you are developing a genuine Joomla component. Instead you should follow the way that the Joomla core code is designed, in particular splitting your component into controllers, models, views and layouts, and the revised component code in the section after this follows this approach. The remainder of this section describes these and other design decisions, which should make the sample code easier to understand.&lt;br /&gt;
&lt;br /&gt;
=== Joomla MVC split ===&lt;br /&gt;
In general terms Joomla splits components into separate types of functionality:&lt;br /&gt;
* the controller contains the &amp;quot;business logic&amp;quot; of the application, including deciding what view and model to use&lt;br /&gt;
* the model provides access to the data &lt;br /&gt;
* the view decides what data is necessary for outputting on the web page and obtains this data from the model&lt;br /&gt;
* the layout outputs the HTML, and includes in the output the data which has been collated by the view. The layout runs within the context of the view, and so has direct access to the variables of the view code. &lt;br /&gt;
&lt;br /&gt;
=== Post/Request/Get pattern ===&lt;br /&gt;
In Joomla all of the HTML output (such as the display of a form) is performed in response to an HTTP GET, following the https://en.wikipedia.org/wiki/Post/Redirect/Get pattern. The sample code above doesn&#039;t follow this pattern, but instead outputs the validation errors and re-displays the form in the response to the HTTP POST request. &lt;br /&gt;
&lt;br /&gt;
To follow the Joomla pattern, in the code which handles the POST we should include a HTTP GET redirect to the form URL. As that GET will then be a new HTTP request/response we must store in the user session the data to be shown when the form is redisplayed:&lt;br /&gt;
* the validation error messages are stored and output using the &amp;lt;tt&amp;gt;enqueueMessage()&amp;lt;/tt&amp;gt; method (which stores data in the user session automatically for us)&lt;br /&gt;
* the user-entered data is stored using &amp;lt;tt&amp;gt;setUserState()&amp;lt;/tt&amp;gt; and retrieved using &amp;lt;tt&amp;gt;getUserState()&amp;lt;/tt&amp;gt;, and keyed by a &amp;lt;tt&amp;gt;context&amp;lt;/tt&amp;gt; which should be unique to this form. The code which provides the data for the form &amp;lt;tt&amp;gt;bind()&amp;lt;/tt&amp;gt; operation must first check using &amp;lt;tt&amp;gt;getUserState()&amp;lt;tt&amp;gt; if there is any prefill data in the session. And if the user enters data which successfully passes validation then &amp;lt;tt&amp;gt;setUserState()&amp;lt;tt&amp;gt; should be called to clear this prefill data in the session, otherwise it will appear whenever the user next displays the form.&lt;br /&gt;
&lt;br /&gt;
=== Separate Controllers ===&lt;br /&gt;
In response to a GET or POST, Joomla always runs the same component file, sample_form1.php in the sample component example above and the top-level sample_form2.php in the example below. The sample_form2.php code below follows the example of the core Joomla components, and has code which passes control to different methods in different controllers based on the value of the HTTP parameter &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt;. This parameter is set by Joomla core javascript based on the submit button, eg in the example below:&lt;br /&gt;
&lt;br /&gt;
onclick=&amp;quot;Joomla.submitbutton(&#039;myform.submit&#039;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The task parameter is in this example set to &amp;quot;myform.submit&amp;quot;. In general the task parameter is of the form &amp;quot;firstpart.secondpart&amp;quot; and for a component called &amp;quot;com_example&amp;quot; Joomla will try to run an instance method called &amp;lt;tt&amp;gt;secondpart()&amp;lt;/tt&amp;gt; of a controller class &amp;lt;tt&amp;gt;ExampleControllerFirstpart&amp;lt;/tt&amp;gt; in a file &amp;lt;tt&amp;gt;firstpart.php&amp;lt;/tt&amp;gt; in the &amp;lt;tt&amp;gt;controllers&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
If the task parameter is not set then Joomla will try to run the &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt; method of the &amp;lt;tt&amp;gt;ExampleController&amp;lt;/tt&amp;gt; class which it will expect to find in &amp;lt;tt&amp;gt;controller.php&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
In terms of code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;$controller = JControllerLegacy::getInstance(&#039;Sample_form2&#039;);&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
uses the &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt; parameter to identify the appropriate controller file to include, and then creates an instance of that controller class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
executes the appropriate method (&amp;lt;tt&amp;gt;secondpart()&amp;lt;/tt&amp;gt; - or in the case below, &amp;lt;tt&amp;gt;submit()&amp;lt;/tt&amp;gt; - or &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt;) of that class. &lt;br /&gt;
&lt;br /&gt;
In this way controller functionality handling GETs (generally in the file &amp;lt;tt&amp;gt;controller.php&amp;lt;/tt&amp;gt;) is separated from that handling POSTs (generally in the files in the &amp;lt;tt&amp;gt;controllers&amp;lt;/tt&amp;gt; folder).&lt;br /&gt;
&lt;br /&gt;
=== Joomla MVC classes === &lt;br /&gt;
&lt;br /&gt;
Joomla provides feature-rich controller, view and model classes from which your component controllers, views and models can inherit. The model code below inherits from &amp;lt;tt&amp;gt;FormModel&amp;lt;/tt&amp;gt; which shields somewhat the Joomla &amp;lt;tt&amp;gt;Form&amp;lt;/tt&amp;gt; API. In this case our model calls &amp;lt;tt&amp;gt;FormModel::loadForm()&amp;lt;/tt&amp;gt;, and this then executes a callback to our &amp;lt;tt&amp;gt;loadFormData()&amp;lt;/tt&amp;gt; to provide the data to &amp;lt;tt&amp;gt;bind()&amp;lt;/tt&amp;gt; to the form. &lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;tt&amp;gt;FormController&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;AdminController&amp;lt;/tt&amp;gt; classes, but these assume that your component is using a database table to store the data. The Joomla MVC Component Development tutorial takes this approach in [[J3.x:Developing an MVC Component/Adding backend actions]].&lt;br /&gt;
&lt;br /&gt;
=== Security Token ===&lt;br /&gt;
Joomla uses a security token on forms to prevent CSRF attacks (see https://en.wikipedia.org/wiki/Cross-site_request_forgery). The token is output in the layout file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and checked within the controller handling the POST:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;$this-&amp;gt;checkToken();&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token is found to be invalid then &amp;lt;tt&amp;gt;checkToken()&amp;lt;/tt&amp;gt; outputs a warning and redirects the user back to the previous page. &lt;br /&gt;
&lt;br /&gt;
=== Client-side Validation ===&lt;br /&gt;
In addition to the server-side validation included through the form XML definition, Joomla also provides a way of including javascript which performs client-side validation on the browser. This is NOT included below, as it&#039;s deemed beyond the scope of this tutorial, but you can find details of it in [[J3.x:Developing an MVC Component/Adding verifications]] and [[Client-side_form_validation|Client-side form validation]].&lt;br /&gt;
&lt;br /&gt;
== Sample Form 2 ==&lt;br /&gt;
This second sample component incorporates the design decisions described above and structures the code according to the Joomla paradigm. The overall file structure is shown in the diagram below.&lt;br /&gt;
&lt;br /&gt;
[[File:Sample-form-files.jpg|Sample Form 2 file structure]].&lt;br /&gt;
&lt;br /&gt;
Starting at the bottom of this diagram and going upwards the file contents are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/sample_form2.php&amp;lt;/tt&amp;gt; Entry point for the component. This is the first file which Joomla runs. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
// Load the appropriate controller class&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;Sample_form2&#039;);&lt;br /&gt;
&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
// Run the task method, or display() if no task parameter&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
 &lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/controller.php&amp;lt;/tt&amp;gt; The controller for handling HTTP GET requests&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
use Joomla\CMS\MVC\Controller\BaseController;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2Controller extends BaseController&lt;br /&gt;
{&lt;br /&gt;
	// Joomla will look for this class within the controller.php file&lt;br /&gt;
	// It will (usually) call the display() method, and will find this is in the BaseController class&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/sample_form2.xml&amp;lt;/tt&amp;gt; Manifest file for the component.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.1.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;com_sample_form2&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Sample form 2&amp;lt;/description&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;sample_form2.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
        &amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
        &amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/views/form/view.html.php&amp;lt;/tt&amp;gt; View file for displaying the form. The controller &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt; function will create instances of the model and view, and call the view &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt; function below. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\MVC\View\HtmlView;&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2ViewForm extends HtmlView&lt;br /&gt;
{&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		if (!$this-&amp;gt;form = $this-&amp;gt;get(&#039;form&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			echo &amp;quot;Can&#039;t load form&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
		parent::display($tpl);	// this will include the layout file edit.php&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/views/form/tmpl/edit.php&amp;lt;/tt&amp;gt; Layout file for displaying the form&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_sample_form2&amp;amp;view=form&amp;amp;layout=edit&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderField(&#039;message&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderField(&#039;email&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderField(&#039;telephone&#039;);  ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;myform.submit&#039;)&amp;quot;&amp;gt;Submit&amp;lt;/button&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/models/form.php&amp;lt;/tt&amp;gt; Model associated with displaying the form. The view &amp;lt;tt&amp;gt;get(&#039;form&#039;)&amp;lt;/tt&amp;gt; gets mapped to the model &amp;lt;tt&amp;gt;getForm()&amp;lt;/tt&amp;gt; method call. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\MVC\Model\FormModel;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2ModelForm extends FormModel&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_sample_form2.sample&#039;,  // just a unique name to identify the form&lt;br /&gt;
			&#039;sample_form&#039;,				// the filename of the XML form definition&lt;br /&gt;
										// Joomla will look in the models/forms folder for this file&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,	// the name of the array for the POST parameters&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData	// will be TRUE&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
            $errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_sample_form2.sample&#039;,	// a unique name to identify the data in the session&lt;br /&gt;
			array(&amp;quot;telephone&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;)	// prefill data if no data found in session&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/models/forms/sample_form.xml&amp;lt;/tt&amp;gt; XML file containing the form definition&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;field&lt;br /&gt;
		name=&amp;quot;message&amp;quot;&lt;br /&gt;
		type=&amp;quot;text&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter message&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;email&amp;quot; &lt;br /&gt;
		type=&amp;quot;email&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter email&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;telephone&amp;quot; &lt;br /&gt;
		type=&amp;quot;tel&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter telephone number&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		validate=&amp;quot;tel&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/controllers/Myform.php&amp;lt;/tt&amp;gt; Controller which handles the HTTP POST&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\MVC\Controller\BaseController;&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2ControllerMyform extends BaseController&lt;br /&gt;
{   &lt;br /&gt;
	public function submit($key = null, $urlVar = null)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;checkToken();&lt;br /&gt;
		&lt;br /&gt;
		$app   = JFactory::getApplication();&lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;form&#039;);&lt;br /&gt;
		$form = $model-&amp;gt;getForm($data, false);&lt;br /&gt;
		if (!$form)&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage($model-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// name of array &#039;jform&#039; must match &#039;control&#039; =&amp;gt; &#039;jform&#039; line in the model code&lt;br /&gt;
		$data  = $this-&amp;gt;input-&amp;gt;post-&amp;gt;get(&#039;jform&#039;, array(), &#039;array&#039;);&lt;br /&gt;
		&lt;br /&gt;
		// This is validate() from the FormModel class, not the Form class&lt;br /&gt;
		// FormModel::validate() calls both Form::filter() and Form::validate() methods&lt;br /&gt;
		$validData = $model-&amp;gt;validate($form, $data);&lt;br /&gt;
&lt;br /&gt;
		if ($validData === false)&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $model-&amp;gt;getErrors();&lt;br /&gt;
&lt;br /&gt;
			foreach ($errors as $error)&lt;br /&gt;
			{&lt;br /&gt;
				if ($error instanceof \Exception)&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($error-&amp;gt;getMessage(), &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($error, &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Save the form data in the session, using a unique identifier&lt;br /&gt;
			$app-&amp;gt;setUserState(&#039;com_sample_form2.sample&#039;, $data);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage(&amp;quot;Data successfully validated&amp;quot;, &#039;notice&#039;);&lt;br /&gt;
			// Clear the form data in the session&lt;br /&gt;
			$app-&amp;gt;setUserState(&#039;com_sample_form2.sample&#039;, null);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// Redirect back to the form in all cases&lt;br /&gt;
		$this-&amp;gt;setRedirect(JRoute::_(&#039;index.php?option=com_sample_form2&amp;amp;view=form&amp;amp;layout=edit&#039;, false));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After creating the files as described above, zip up the &amp;lt;tt&amp;gt;com_sample_form2&amp;lt;/tt&amp;gt; folder to create com_sample_form2.zip and install this component. Then navigate to your Joomla site and add into the URL the parameters &amp;lt;tt&amp;gt;&amp;amp;option=com_sample_form2&amp;amp;view=form&amp;amp;layout=edit&amp;lt;tt&amp;gt;. This should display the form, and should work in a similar fashion to previous sample form, except that errors etc will appear in the message part of the Joomla display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Basic_form_guide&amp;diff=656926</id>
		<title>Basic form guide</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Basic_form_guide&amp;diff=656926"/>
		<updated>2020-04-04T11:48:55Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: Adding J in front of Factory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This is one of a series of [[API Guides]], which aim to help you understand how to use the Joomla APIs through providing detailed explanations and sample code which you can easily install and run.&lt;br /&gt;
&lt;br /&gt;
The Joomla Form class and API enables you to easily develop HTML forms and handle the user&#039;s input. &lt;br /&gt;
&lt;br /&gt;
This page describes how you interact in general with the Joomla Form class and provides the code of a simple component which you can install to demonstrate use of this API. &lt;br /&gt;
&lt;br /&gt;
Joomla itself also has a specific way of designing form functionality, and this page includes tutorial material to help you understand and develop your component to align with these principles.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
The diagram below shows the basic use of the Joomla Form class.&lt;br /&gt;
&lt;br /&gt;
[[File:basicform.jpg|Using Joomla Forms]] &lt;br /&gt;
&lt;br /&gt;
Firstly, you need to define your form in XML using Joomla [[Standard form field types]]. See the component code below for an example. In basic terms, each field element in your XML file maps to an HTML (mostly &amp;quot;input&amp;quot;) element in the form, with the XML field attributes mapping to the (input) element attributes. Many of the possible field attributes are listed in [[Text form field type]].&lt;br /&gt;
&lt;br /&gt;
=== Step 1 Loading the Form ===&lt;br /&gt;
The user clicks on the URL of your form, and Joomla routes the HTTP GET request through to your component code. You need to call &amp;lt;tt&amp;gt;Form::getInstance()&amp;lt;/tt&amp;gt; passing the name of your XML file with your form definition. The Joomla Form code creates a Form instance, and then (in &amp;lt;tt&amp;gt;Form::loadFile()&amp;lt;/tt&amp;gt;) reads the file into memory (as a PHP &amp;lt;tt&amp;gt;SimpleXMLElement&amp;lt;/tt&amp;gt;) and parses the XML to ensure it&#039;s valid. The main parameters passed to &amp;lt;tt&amp;gt;getInstance()&amp;lt;tt&amp;gt; are:&lt;br /&gt;
* name – a string specifying the identity to give to this form – it just needs to be unique, so that it doesn&#039;t clash with any other Joomla forms on the same webpage&lt;br /&gt;
* data – the name of the XML file which has your form definition&lt;br /&gt;
* options – an array of options, with the &amp;quot;control&amp;quot; element specifying the name of the array which the POST parameters will be held in. For example, the sample code has &amp;lt;tt&amp;gt;array(&amp;quot;control&amp;quot;=&amp;gt;&amp;quot;myform&amp;quot;)&amp;lt;/tt&amp;gt; which means that the HTML input elements will have name attributes set to &amp;quot;myform[message]&amp;quot;, &amp;quot;myform[email]&amp;quot;, etc,. They will be passed in POST parameters that way, and it&#039;s then very easy to get these into a PHP array.&lt;br /&gt;
&lt;br /&gt;
=== Step 2 Providing Pre-fill Data ===&lt;br /&gt;
You provide values for any form element you wish. For example, if this form is being used to edit a record in the database, then you would pre-populate it with existing field values from the database. You can provide values by setting up an associative array &amp;lt;tt&amp;gt;$data&amp;lt;/tt&amp;gt; and passing it to &amp;lt;tt&amp;gt;Form::bind($data)&amp;lt;/tt&amp;gt; method, and Joomla Form then stores this data locally within the Form instance.&lt;br /&gt;
&lt;br /&gt;
=== Step 3 Outputting the Form in HTML ===&lt;br /&gt;
You call &amp;lt;tt&amp;gt;renderField(fieldName)&amp;lt;/tt&amp;gt; on the Form instance and you get returned the HTML which you can echo to the output. Joomla processes its XML representation of your form to obtain the section relating to the passed-in fieldName, generates the HTML for this HTML element and includes the &amp;quot;value&amp;quot; attribute based on the pre-populated data which you passed in step 2.&lt;br /&gt;
When outputting the form you also need to surround the input elements in a &amp;lt;tt&amp;gt;&amp;lt;form&amp;gt;&amp;lt;/tt&amp;gt; element and add a submit button. &lt;br /&gt;
&lt;br /&gt;
=== Step 4 User Submitting the Form ===&lt;br /&gt;
The user enters data into your HTML form and clicks on the submit button. The browser generates an HTTP POST request to the URL specified in the &amp;lt;tt&amp;gt;&amp;lt;form&amp;gt;&amp;lt;/tt&amp;gt; element and passes to the server in POST parameters the values entered by the user; each parameter keyed by the &amp;quot;name&amp;quot; attribute of the HTML input element.&lt;br /&gt;
&lt;br /&gt;
Joomla routes this POST through to your component. As this is a new HTTP request the previous Form instance no longer exists, so you have to again call &amp;lt;tt&amp;gt;Form::getInstance()&amp;lt;/tt&amp;gt;, passing the filename of your form XML, and Joomla (as before) creates a Form instance and reads this file into memory.&lt;br /&gt;
&lt;br /&gt;
=== Step 5 Handling the HTTP POST Data ===&lt;br /&gt;
In this step you process the submitted data. This involves:&lt;br /&gt;
# Getting the POST data using &amp;lt;tt&amp;gt;Factory::getApplication-&amp;gt;input-&amp;gt;get()&amp;lt;tt&amp;gt;. Usually the &amp;quot;name&amp;quot; attributes of the input elements are defined so that the POST parameters appear as an array, and you can use the ARRAY filter from [[Retrieving_request_data_using_JInput]] to read these directly into a PHP array. However, this means that the individual elements are not filtered at all. &lt;br /&gt;
# Filtering. This applies filtering on each of the input values. The filter applied to a field is governed by the &amp;quot;filter=...&amp;quot; attribute on that field in your form XML file, or if not present then the default filter will remove HTML tags etc from your data values. The possible filters are in the &amp;lt;tt&amp;gt;filterField()&amp;lt;/tt&amp;gt; method of the Form class (and see https://joomla.stackexchange.com/questions/5764/what-are-possible-filters-in-joomla-form-fields). Note that these form field filters are different from the jinput filters. &lt;br /&gt;
# Validation. You validate the data which the user has entered by calling validate($data) on your Form instance, passing an associative array of the (filtered) user data. Joomla compares the user-entered data with the validation you defined in your form XML file, and generates errors for fields which fail the validation.&lt;br /&gt;
&lt;br /&gt;
If there are validation errors then you should display those errors to the user, and redisplay the form, pre-populating the fields with the (filtered) data which the user entered previously.&lt;br /&gt;
&lt;br /&gt;
If there are no errors then you can confirm this to the user, and show the next web page.&lt;br /&gt;
&lt;br /&gt;
== Sample Form 1 ==&lt;br /&gt;
Below is the code for a small component which you can install to demonstrate basic use of Joomla forms. Place the following 3 files into a folder called &amp;quot;com_sample_form1&amp;quot;. Then zip up the folder to create &amp;lt;tt&amp;gt;com_sample_form1.zip&amp;lt;/tt&amp;gt; and install this as a component on your Joomla instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form1.xml&amp;lt;/tt&amp;gt; Manifest file for the component&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.1.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;com_sample_form1&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Sample form 1&amp;lt;/description&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;sample_form1.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;sample_form.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;sample_form.xml&amp;lt;/tt&amp;gt; File containing the XML for the form definition&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;field&lt;br /&gt;
		name=&amp;quot;message&amp;quot;&lt;br /&gt;
		type=&amp;quot;text&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter message&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;email&amp;quot; &lt;br /&gt;
		type=&amp;quot;email&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter email&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;telephone&amp;quot; &lt;br /&gt;
		type=&amp;quot;tel&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter telephone number&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		validate=&amp;quot;tel&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;sample_form1.php&amp;lt;/tt&amp;gt; Component code.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\Form\Form;&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
$form = Form::getInstance(&amp;quot;sample&amp;quot;, __DIR__ . &amp;quot;/sample_form.xml&amp;quot;, array(&amp;quot;control&amp;quot; =&amp;gt; &amp;quot;myform&amp;quot;));&lt;br /&gt;
$prefillData = array(&amp;quot;email&amp;quot; =&amp;gt; &amp;quot;.@.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if ($_SERVER[&#039;REQUEST_METHOD&#039;] === &#039;POST&#039;) &lt;br /&gt;
{&lt;br /&gt;
	$app   = JFactory::getApplication();&lt;br /&gt;
	$data = $app-&amp;gt;input-&amp;gt;post-&amp;gt;get(&#039;myform&#039;, array(), &amp;quot;array&amp;quot;);&lt;br /&gt;
	echo &amp;quot;Message was &amp;quot; . $data[&amp;quot;message&amp;quot;] . &lt;br /&gt;
		&amp;quot;, email was &amp;quot; . $data[&amp;quot;email&amp;quot;] . &lt;br /&gt;
		&amp;quot;, and telephone was &amp;quot; . $data[&amp;quot;telephone&amp;quot;] . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
	$filteredData = $form-&amp;gt;filter($data);&lt;br /&gt;
	$result = $form-&amp;gt;validate($filteredData);&lt;br /&gt;
	if ($result)&lt;br /&gt;
	{&lt;br /&gt;
		echo &amp;quot;Validation passed ok&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		echo &amp;quot;Validation failed&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
		$errors = $form-&amp;gt;getErrors();&lt;br /&gt;
		foreach ($errors as $error)&lt;br /&gt;
		{&lt;br /&gt;
			echo $error-&amp;gt;getMessage() . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		// in the redisplayed form show what the user entered (after data is filtered)&lt;br /&gt;
		$prefillData = $filteredData;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$form-&amp;gt;bind($prefillData);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_sample_form1&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;sampleForm&amp;quot; id=&amp;quot;adminForm&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;?php echo $form-&amp;gt;renderField(&#039;message&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $form-&amp;gt;renderField(&#039;email&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $form-&amp;gt;renderField(&#039;telephone&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;button type=&amp;quot;submit&amp;quot;&amp;gt;Submit&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once installed navigate to your site and add the following parameter to the URL: &lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;amp;option=com_sample_form1&amp;lt;tt&amp;gt;. You should then see the form displayed with 3 required fields:&lt;br /&gt;
* a general text input field for a message&lt;br /&gt;
* an email input field, pre-populated with the string &amp;quot;.@.&amp;quot;&lt;br /&gt;
* a telephone number input field.&lt;br /&gt;
and using your browser&#039;s development tools you can compare the html attributes with the attributes in your XML form definition. &lt;br /&gt;
&lt;br /&gt;
Note that modern browsers will do some validation on the values you enter, specifically they will validate the email address and will force you to enter something into fields with the &amp;quot;required&amp;quot; attribute set, but don&#039;t (currently) do validation on telephone number fields.&lt;br /&gt;
&lt;br /&gt;
Once you enter valid data into the fields and press Submit, then the data will be sent to the server and the POST leg of the sample code will be run. This runs the filtering and validation routines. If there are validation errors then the code outputs the error messages, and prefills the form with the data which the user entered before redisplaying it.&lt;br /&gt;
&lt;br /&gt;
== MVC and other considerations ==&lt;br /&gt;
The way that the code above is written isn&#039;t the best approach if you are developing a genuine Joomla component. Instead you should follow the way that the Joomla core code is designed, in particular splitting your component into controllers, models, views and layouts, and the revised component code in the section after this follows this approach. The remainder of this section describes these and other design decisions, which should make the sample code easier to understand.&lt;br /&gt;
&lt;br /&gt;
=== Joomla MVC split ===&lt;br /&gt;
In general terms Joomla splits components into separate types of functionality:&lt;br /&gt;
* the controller contains the &amp;quot;business logic&amp;quot; of the application, including deciding what view and model to use&lt;br /&gt;
* the model provides access to the data &lt;br /&gt;
* the view decides what data is necessary for outputting on the web page and obtains this data from the model&lt;br /&gt;
* the layout outputs the HTML, and includes in the output the data which has been collated by the view. The layout runs within the context of the view, and so has direct access to the variables of the view code. &lt;br /&gt;
&lt;br /&gt;
=== Post/Request/Get pattern ===&lt;br /&gt;
In Joomla all of the HTML output (such as the display of a form) is performed in response to an HTTP GET, following the https://en.wikipedia.org/wiki/Post/Redirect/Get pattern. The sample code above doesn&#039;t follow this pattern, but instead outputs the validation errors and re-displays the form in the response to the HTTP POST request. &lt;br /&gt;
&lt;br /&gt;
To follow the Joomla pattern, in the code which handles the POST we should include a HTTP GET redirect to the form URL. As that GET will then be a new HTTP request/response we must store in the user session the data to be shown when the form is redisplayed:&lt;br /&gt;
* the validation error messages are stored and output using the &amp;lt;tt&amp;gt;enqueueMessage()&amp;lt;/tt&amp;gt; method (which stores data in the user session automatically for us)&lt;br /&gt;
* the user-entered data is stored using &amp;lt;tt&amp;gt;setUserState()&amp;lt;/tt&amp;gt; and retrieved using &amp;lt;tt&amp;gt;getUserState()&amp;lt;/tt&amp;gt;, and keyed by a &amp;lt;tt&amp;gt;context&amp;lt;/tt&amp;gt; which should be unique to this form. The code which provides the data for the form &amp;lt;tt&amp;gt;bind()&amp;lt;/tt&amp;gt; operation must first check using &amp;lt;tt&amp;gt;getUserState()&amp;lt;tt&amp;gt; if there is any prefill data in the session. And if the user enters data which successfully passes validation then &amp;lt;tt&amp;gt;setUserState()&amp;lt;tt&amp;gt; should be called to clear this prefill data in the session, otherwise it will appear whenever the user next displays the form.&lt;br /&gt;
&lt;br /&gt;
=== Separate Controllers ===&lt;br /&gt;
In response to a GET or POST, Joomla always runs the same component file, sample_form1.php in the sample component example above and the top-level sample_form2.php in the example below. The sample_form2.php code below follows the example of the core Joomla components, and has code which passes control to different methods in different controllers based on the value of the HTTP parameter &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt;. This parameter is set by Joomla core javascript based on the submit button, eg in the example below:&lt;br /&gt;
&lt;br /&gt;
onclick=&amp;quot;Joomla.submitbutton(&#039;myform.submit&#039;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The task parameter is in this example set to &amp;quot;myform.submit&amp;quot;. In general the task parameter is of the form &amp;quot;firstpart.secondpart&amp;quot; and for a component called &amp;quot;com_example&amp;quot; Joomla will try to run an instance method called &amp;lt;tt&amp;gt;secondpart()&amp;lt;/tt&amp;gt; of a controller class &amp;lt;tt&amp;gt;ExampleControllerFirstpart&amp;lt;/tt&amp;gt; in a file &amp;lt;tt&amp;gt;firstpart.php&amp;lt;/tt&amp;gt; in the &amp;lt;tt&amp;gt;controllers&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
If the task parameter is not set then Joomla will try to run the &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt; method of the &amp;lt;tt&amp;gt;ExampleController&amp;lt;/tt&amp;gt; class which it will expect to find in &amp;lt;tt&amp;gt;controller.php&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
In terms of code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;$controller = JControllerLegacy::getInstance(&#039;Sample_form2&#039;);&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
uses the &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt; parameter to identify the appropriate controller file to include, and then creates an instance of that controller class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
executes the appropriate method (&amp;lt;tt&amp;gt;secondpart()&amp;lt;/tt&amp;gt; - or in the case below, &amp;lt;tt&amp;gt;submit()&amp;lt;/tt&amp;gt; - or &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt;) of that class. &lt;br /&gt;
&lt;br /&gt;
In this way controller functionality handling GETs (generally in the file &amp;lt;tt&amp;gt;controller.php&amp;lt;/tt&amp;gt;) is separated from that handling POSTs (generally in the files in the &amp;lt;tt&amp;gt;controllers&amp;lt;/tt&amp;gt; folder).&lt;br /&gt;
&lt;br /&gt;
=== Joomla MVC classes === &lt;br /&gt;
&lt;br /&gt;
Joomla provides feature-rich controller, view and model classes from which your component controllers, views and models can inherit. The model code below inherits from &amp;lt;tt&amp;gt;FormModel&amp;lt;/tt&amp;gt; which shields somewhat the Joomla &amp;lt;tt&amp;gt;Form&amp;lt;/tt&amp;gt; API. In this case our model calls &amp;lt;tt&amp;gt;FormModel::loadForm()&amp;lt;/tt&amp;gt;, and this then executes a callback to our &amp;lt;tt&amp;gt;loadFormData()&amp;lt;/tt&amp;gt; to provide the data to &amp;lt;tt&amp;gt;bind()&amp;lt;/tt&amp;gt; to the form. &lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;tt&amp;gt;FormController&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;AdminController&amp;lt;/tt&amp;gt; classes, but these assume that your component is using a database table to store the data. The Joomla MVC Component Development tutorial takes this approach in [[J3.x:Developing an MVC Component/Adding backend actions]].&lt;br /&gt;
&lt;br /&gt;
=== Security Token ===&lt;br /&gt;
Joomla uses a security token on forms to prevent CSRF attacks (see https://en.wikipedia.org/wiki/Cross-site_request_forgery). The token is output in the layout file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and checked within the controller handling the POST:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;$this-&amp;gt;checkToken();&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the token is found to be invalid then &amp;lt;tt&amp;gt;checkToken()&amp;lt;/tt&amp;gt; outputs a warning and redirects the user back to the previous page. &lt;br /&gt;
&lt;br /&gt;
=== Client-side Validation ===&lt;br /&gt;
In addition to the server-side validation included through the form XML definition, Joomla also provides a way of including javascript which performs client-side validation on the browser. This is NOT included below, as it&#039;s deemed beyond the scope of this tutorial, but you can find details of it in [[J3.x:Developing an MVC Component/Adding verifications]] and [[Client-side_form_validation|Client-side form validation]].&lt;br /&gt;
&lt;br /&gt;
== Sample Form 2 ==&lt;br /&gt;
This second sample component incorporates the design decisions described above and structures the code according to the Joomla paradigm. The overall file structure is shown in the diagram below.&lt;br /&gt;
&lt;br /&gt;
[[File:Sample-form-files.jpg|Sample Form 2 file structure]].&lt;br /&gt;
&lt;br /&gt;
Starting at the bottom of this diagram and going upwards the file contents are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/sample_form2.php&amp;lt;/tt&amp;gt; Entry point for the component. This is the first file which Joomla runs. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
// Load the appropriate controller class&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;Sample_form2&#039;);&lt;br /&gt;
&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
// Run the task method, or display() if no task parameter&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
 &lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/controller.php&amp;lt;/tt&amp;gt; The controller for handling HTTP GET requests&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
use Joomla\CMS\MVC\Controller\BaseController;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2Controller extends BaseController&lt;br /&gt;
{&lt;br /&gt;
	// Joomla will look for this class within the controller.php file&lt;br /&gt;
	// It will (usually) call the display() method, and will find this is in the BaseController class&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/sample_form2.xml&amp;lt;/tt&amp;gt; Manifest file for the component.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.1.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;com_sample_form2&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Sample form 2&amp;lt;/description&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;sample_form2.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
        &amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
        &amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/views/form/view.html.php&amp;lt;/tt&amp;gt; View file for displaying the form. The controller &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt; function will create instances of the model and view, and call the view &amp;lt;tt&amp;gt;display()&amp;lt;/tt&amp;gt; function below. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\MVC\View\HtmlView;&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2ViewForm extends HtmlView&lt;br /&gt;
{&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		if (!$this-&amp;gt;form = $this-&amp;gt;get(&#039;form&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			echo &amp;quot;Can&#039;t load form&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
		parent::display($tpl);	// this will include the layout file edit.php&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/views/form/tmpl/edit.php&amp;lt;/tt&amp;gt; Layout file for displaying the form&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_sample_form2&amp;amp;view=form&amp;amp;layout=edit&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderField(&#039;message&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderField(&#039;email&#039;);  ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderField(&#039;telephone&#039;);  ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;myform.submit&#039;)&amp;quot;&amp;gt;Submit&amp;lt;/button&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/models/form.php&amp;lt;/tt&amp;gt; Model associated with displaying the form. The view &amp;lt;tt&amp;gt;get(&#039;form&#039;)&amp;lt;/tt&amp;gt; gets mapped to the model &amp;lt;tt&amp;gt;getForm()&amp;lt;/tt&amp;gt; method call. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\MVC\Model\FormModel;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2ModelForm extends FormModel&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_sample_form2.sample&#039;,  // just a unique name to identify the form&lt;br /&gt;
			&#039;sample_form&#039;,				// the filename of the XML form definition&lt;br /&gt;
										// Joomla will look in the models/forms folder for this file&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,	// the name of the array for the POST parameters&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData	// will be TRUE&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
            $errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_sample_form2.sample&#039;,	// a unique name to identify the data in the session&lt;br /&gt;
			array(&amp;quot;telephone&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;)	// prefill data if no data found in session&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/models/forms/sample_form.xml&amp;lt;/tt&amp;gt; XML file containing the form definition&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;field&lt;br /&gt;
		name=&amp;quot;message&amp;quot;&lt;br /&gt;
		type=&amp;quot;text&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter message&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;email&amp;quot; &lt;br /&gt;
		type=&amp;quot;email&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter email&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;field name=&amp;quot;telephone&amp;quot; &lt;br /&gt;
		type=&amp;quot;tel&amp;quot;&lt;br /&gt;
		label=&amp;quot;Enter telephone number&amp;quot;&lt;br /&gt;
		required=&amp;quot;true&amp;quot;&lt;br /&gt;
		size=&amp;quot;40&amp;quot;&lt;br /&gt;
		class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
		validate=&amp;quot;tel&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;com_sample_form2/controllers/Myform.php&amp;lt;/tt&amp;gt; Controller which handles the HTTP POST&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\MVC\Controller\BaseController;&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
class Sample_form2ControllerMyform extends BaseController&lt;br /&gt;
{   &lt;br /&gt;
	public function submit($key = null, $urlVar = null)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;checkToken();&lt;br /&gt;
		&lt;br /&gt;
		$app   = Factory::getApplication();&lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;form&#039;);&lt;br /&gt;
		$form = $model-&amp;gt;getForm($data, false);&lt;br /&gt;
		if (!$form)&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage($model-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// name of array &#039;jform&#039; must match &#039;control&#039; =&amp;gt; &#039;jform&#039; line in the model code&lt;br /&gt;
		$data  = $this-&amp;gt;input-&amp;gt;post-&amp;gt;get(&#039;jform&#039;, array(), &#039;array&#039;);&lt;br /&gt;
		&lt;br /&gt;
		// This is validate() from the FormModel class, not the Form class&lt;br /&gt;
		// FormModel::validate() calls both Form::filter() and Form::validate() methods&lt;br /&gt;
		$validData = $model-&amp;gt;validate($form, $data);&lt;br /&gt;
&lt;br /&gt;
		if ($validData === false)&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $model-&amp;gt;getErrors();&lt;br /&gt;
&lt;br /&gt;
			foreach ($errors as $error)&lt;br /&gt;
			{&lt;br /&gt;
				if ($error instanceof \Exception)&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($error-&amp;gt;getMessage(), &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($error, &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Save the form data in the session, using a unique identifier&lt;br /&gt;
			$app-&amp;gt;setUserState(&#039;com_sample_form2.sample&#039;, $data);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage(&amp;quot;Data successfully validated&amp;quot;, &#039;notice&#039;);&lt;br /&gt;
			// Clear the form data in the session&lt;br /&gt;
			$app-&amp;gt;setUserState(&#039;com_sample_form2.sample&#039;, null);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// Redirect back to the form in all cases&lt;br /&gt;
		$this-&amp;gt;setRedirect(JRoute::_(&#039;index.php?option=com_sample_form2&amp;amp;view=form&amp;amp;layout=edit&#039;, false));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After creating the files as described above, zip up the &amp;lt;tt&amp;gt;com_sample_form2&amp;lt;/tt&amp;gt; folder to create com_sample_form2.zip and install this component. Then navigate to your Joomla site and add into the URL the parameters &amp;lt;tt&amp;gt;&amp;amp;option=com_sample_form2&amp;amp;view=form&amp;amp;layout=edit&amp;lt;tt&amp;gt;. This should display the form, and should work in a similar fashion to previous sample form, except that errors etc will appear in the message part of the Joomla display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Levels&amp;diff=651117</id>
		<title>J3.x:Developing an MVC Component/Adding Levels</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Levels&amp;diff=651117"/>
		<updated>2020-03-23T12:14:49Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:2--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; In this step we add levels to our helloworld component, which basically means that we&#039;re implementing a tree structure on our helloworld records.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; You can view an accompanying video at [https://youtu.be/vpchQZFQlso Adding levels].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=vpchQZFQlso}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; Joomla implements menuitems and categories as tree structures. This means, for example, that menuitems on a menu can have submenus off them (as can be seen on the Joomla admin menu) and those submenuitems can in turn have submenus off them, and so on. The submenus are ordered, so you can define which order the submenuitems appear.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; Some terminology:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
# each of our records is a node within the tree structure&lt;br /&gt;
# there is a root node which occupies the highest position in the hierarchy; within Joomla we define this root node as being at level 0&lt;br /&gt;
# the root node has a number of children, and these will be at level 1. Each of these children&#039;s  parent is the root node&lt;br /&gt;
# these children may in turn have children of their own, at level 2, and so on.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:NestedSetModel.png|right|Nested Set Model]] &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Node&lt;br /&gt;
! Left&lt;br /&gt;
! Right&lt;br /&gt;
|-&lt;br /&gt;
|Clothing&lt;br /&gt;
|1&lt;br /&gt;
|22&lt;br /&gt;
|-&lt;br /&gt;
|Men&#039;s&lt;br /&gt;
|2&lt;br /&gt;
|9&lt;br /&gt;
|-&lt;br /&gt;
|Suits&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|-&lt;br /&gt;
|Slacks&lt;br /&gt;
|4&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|Jackets&lt;br /&gt;
|6&lt;br /&gt;
|7&lt;br /&gt;
|-&lt;br /&gt;
|Women&#039;s&lt;br /&gt;
|10&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|Dresses&lt;br /&gt;
|11&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|Evening Gowns&lt;br /&gt;
|12&lt;br /&gt;
|13&lt;br /&gt;
|-&lt;br /&gt;
|Sun Dresses&lt;br /&gt;
|14&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|Skirts&lt;br /&gt;
|17&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|Blouses&lt;br /&gt;
|19&lt;br /&gt;
|20&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; To implement this tree structure within a relational database Joomla uses the [https://en.wikipedia.org/wiki/Nested_set_model Nested Set Model]. This involves assigning to each record a left (in Joomla lft) and a right (in Joomla rgt) field, as shown in the diagram and associated table. You should be able to see how using the lft and rgt values you can determine for any node its level in the tree, its parent, and for nodes with the same parent, the ordering of those nodes.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt; While having lft and rgt values may be sufficient to define a tree completely in theory, in practice adding additional fields give more opportunity for navigating the tree efficiently, and in Joomla there are 5 fields associated with a tree structure:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
* lft and rgt fields&lt;br /&gt;
* parent id – the id of the parent node&lt;br /&gt;
* level - the level in the hierarchy, level 0 (Clothing in the example above) being the highest&lt;br /&gt;
* path&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; The path is like the path in a directory structure, and is a join of the alias values going from the root node to the node in question, with a slash separating the aliases. For example, referring to the diagram above, if Clothing is the root node, then the path for Jackets would be Men-s/Suits/Jackets.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; Notice how the additional fields provide us with efficient mechanisms for navigating the tree. For instance, we can do a query selecting records WHERE parent is Suits, and ORDER BY lft, and that will give us Slacks and Jackets in order. These sorts of operations are generally done on the front end, where we want the site to perform well. By contrast, admin operations can involve many updates. For example, if we move Blouses to be the first child under Men&#039;s then it will involve updating the lft and rgt values of nearly all the records in the database table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; As you might expect, Joomla provides library functions to help with positioning a new node in the tree, reparenting an item, deleting an item (and all of its children), reordering items, etc.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; Firstly, we&#039;ll want our install of this step to build the tree structure in our helloworld table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; In our admin helloworlds view we will show the level of the record by indenting the title, as is done for categories and menuitems. We&#039;ll also display the values of our new fields – really for our own diagnostic purposes, as you wouldn&#039;t do this in a real application.&amp;lt;/translate&amp;gt; &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; In the previous step we introduced functionality which enabled the administrator to drag the records to reorder them. We&#039;ll continue using this mechanism, but reordering will be limited to records having the same parent (ie siblings), and the records will have to be ordered in ascending order first (sorting by &amp;quot;Ordering descending&amp;quot; won&#039;t do).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; If we delete an item, then all of its children will be moved up the hierarchy, to have as parent the parent of the deleted record.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In the admin edit view we&#039;ll allow the administrator to:&lt;br /&gt;
* specify a new parent for the item&lt;br /&gt;
* specify the positioning of this item within the order of its siblings&lt;br /&gt;
(albeit, if we change the parent, then the new siblings will appear only after Save).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; We&#039;ll also ensure that New and Save as Copy functionality works as expected.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; In the frontend we&#039;ll change the page which displays a HelloWorld record to present as well the parent and the descendants of that record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; We&#039;ll also update the frontend form for creating a new helloworld record so that it prompts for the parent as well.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; Initially we&#039;ll need to set up our database as a nested set tree. We&#039;ll want record with id=1 to be the root of the tree, so if there&#039;s an existing record with id=1 we&#039;ll give it a new number, and we&#039;ll change any associated records in the Assets and Associations table. After the root record is in place, we&#039;ll set the other helloworld records as direct children of the root, and set the new fields accordingly. As this is too complex to do in SQL script, we&#039;ll code this within the install &amp;lt;tt&amp;gt;script.php&amp;lt;/tt&amp;gt; file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; The code for performing operations on the nested set database fields is within &amp;lt;tt&amp;gt;JTableNested&amp;lt;/tt&amp;gt;, so we change our helloworld table class to inherit from it instead of &amp;lt;tt&amp;gt;JTable&amp;lt;/tt&amp;gt;. We&#039;ll use a number of methods from within this class to apply database changes arising from admin operations:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt; &amp;lt;tt&amp;gt;setLocation($referenceId, $position)&amp;lt;/tt&amp;gt; to define how the current record is positioned (for ordering) with respect to its siblings - we&#039;ll use this when the administrator uses the helloworld edit form and changes the parent or the ordering of the record with respect to its siblings&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; &amp;lt;tt&amp;gt;saveorder($idArray, $lft_array)&amp;lt;/tt&amp;gt; to store a revised order of siblings - we&#039;ll use this whenever the administrator uses the drag record functionality to move a record&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt; &amp;lt;tt&amp;gt;store($updateNulls)&amp;lt;/tt&amp;gt; to store a new or updated record - this will be called by the &amp;lt;tt&amp;gt;save()&amp;lt;/tt&amp;gt; method in &amp;lt;tt&amp;gt;JModelAdmin&amp;lt;/tt&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; &amp;lt;tt&amp;gt;delete($pk, $children)&amp;lt;/tt&amp;gt; to delete a record and (optionally) all of its descendants - we&#039;ll use this whenever the administrator deletes one or more helloworld records, and we&#039;ll use the option of NOT deleting the descendants.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; &amp;lt;tt&amp;gt;rebuild(...)&amp;lt;/tt&amp;gt; to recalculate the lft, rgt and path values for the helloworld records - we&#039;ll use this after we reposition a record by changing its parent or ordering in the edit form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; In our Helloworlds layout file the display of the new fields is straightforward. The other changes involve the following.&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; To indent the records based on the level (as is done for menus and categories) we&#039;ll use the standard joomla layout in layouts/joomla/html/treeprefix.php&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt; To support dragging the rows to reorder, the javascript code in sortablelist.js which we encountered in the previous step [[S:MyLanguage/J3.x:Developing an MVC Component/Adding Ordering|Adding Ordering]] will be used again, but for handing the nested set we specify different parameters to the function, and we need to add different attributes to the &amp;lt;tr&amp;gt; elements.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; In our Helloworld (edit) layout we&#039;ll display the input elements to capture&amp;lt;/translate&amp;gt;  &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; the record&#039;s parent – this will be a list of all the helloworld records, but excluding the record itself (as a record can&#039;t have itself as its parent) and its descendants (as this would form a loop in the tree), and,&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; its position with respect to the record&#039;s siblings – for outputting the siblings in order.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; Because of the specific requirements of these select lists, neither can be implemented using a standard Joomla form field and XML, and we&#039;ll define a custom form field for each and define the list of possible values dynamically.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; In the front end we&#039;ll use another Nested Table function &amp;lt;tt&amp;gt;getTree()&amp;lt;/tt&amp;gt; to find the descendants of the record we&#039;re displaying. And in the front-end form for creating a new record we&#039;ll reuse the admin custom form field for presenting the list of records to choose a parent.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Where in the previous tutorial step we used the &amp;lt;tt&amp;gt;ordering&amp;lt;/tt&amp;gt; database field for ordering, in this step we will use the &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt; database field. So that is a global change within both our admin and site code.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Database and Install == &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; Updated SQL install file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;13-17,32-35&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out` INT(10) NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out_time` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`alias`  VARCHAR(40)  NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`language`  CHAR(7)  NOT NULL DEFAULT &#039;*&#039;,&lt;br /&gt;
	`parent_id`	int(10)    NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`level`	int(10)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`path`	VARCHAR(400)    NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`lft`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`rgt`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`image`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`latitude` DECIMAL(9,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	`longitude` DECIMAL(10,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
CREATE UNIQUE INDEX `aliasindex` ON `#__helloworld` (`alias`, `catid`);&lt;br /&gt;
&lt;br /&gt;
/*We added the published column to the INTO statement in order to set the published column, in the helloworld root record, to 1 otherwise you won&#039;t be able to publish items.*/&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`,`alias`,`language`, `parent_id`, `level`, `path`, `lft`, `rgt`, `published`) VALUES&lt;br /&gt;
(&#039;helloworld root&#039;,&#039;helloworld-root-alias&#039;,&#039;en-GB&#039;, 0, 0, &#039;&#039;, 0, 5, 1),&lt;br /&gt;
(&#039;Hello World!&#039;,&#039;hello-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;hello-world&#039;, 1, 2, 0),&lt;br /&gt;
(&#039;Goodbye World!&#039;,&#039;goodbye-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;goodbye-world&#039;, 3, 4, 0);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; For the upgrade we define the new database structure in the file below ...&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.26.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;/admin/sql/updates/mysql/0.0.26.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE `#__helloworld` DROP COLUMN `ordering`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `parent_id` INT(10) NOT NULL DEFAULT &#039;1&#039; AFTER `language`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `level`	int(10)    NOT NULL DEFAULT &#039;0&#039; AFTER `parent_id`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `path`	varchar(400)    NOT NULL DEFAULT &#039;&#039; AFTER `level`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `lft`	int(11)    NOT NULL DEFAULT &#039;0&#039; AFTER `path`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `rgt`	int(11)    NOT NULL DEFAULT &#039;0&#039; AFTER `lft`;&lt;br /&gt;
UPDATE `#__helloworld` SET `path` = `alias`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; But for building the tree we use an install &amp;lt;tt&amp;gt;script.php&amp;lt;/tt&amp;gt; file. This code does the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; it checks if there&#039;s already a root record with id=1. If so, then it assumes that the tree has been built, and it exits without changing anything.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; otherwise if there&#039;s an ordinary record with id=1, then it changes its id to one bigger than the max id in the table. It then changes any associated record in the Assets table and in the Associations table. (We looked at how the key in the Associations table was created using an md5 hash in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations|Adding Associations]]. If the helloworld record with id=1 had had this new id originally, then the associations key formed by the md5 hash would have been different, but actually that doesn&#039;t matter. In fact, when the md5 hash is done, if the associations in the array are in a different order then it would produce a different key anyway).&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt; it creates the root record, with id=1, and sets the lft and rgt values for it (based on the total number of records in the table).&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:48--&amp;gt; it updates the lft and rgt values for all the existing helloworld records in the table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;script.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;script.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;93-248&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Script file of HelloWorld component.&lt;br /&gt;
 *&lt;br /&gt;
 * The name of this class is dependent on the component being installed.&lt;br /&gt;
 * The class name should have the component&#039;s name, directly followed by&lt;br /&gt;
 * the text InstallerScript (ex:. com_helloWorldInstallerScript).&lt;br /&gt;
 *&lt;br /&gt;
 * This class will be called by Joomla!&#039;s installer, if specified in your component&#039;s&lt;br /&gt;
 * manifest file, and is used for custom automation actions in its installation process.&lt;br /&gt;
 *&lt;br /&gt;
 * In order to use this automation script, you should reference it in your component&#039;s&lt;br /&gt;
 * manifest file as follows:&lt;br /&gt;
 * &amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
class com_helloWorldInstallerScript&lt;br /&gt;
{&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is installed.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling this method.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function install($parent) &lt;br /&gt;
    {&lt;br /&gt;
        $parent-&amp;gt;getParent()-&amp;gt;setRedirectURL(&#039;index.php?option=com_helloworld&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is uninstalled.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling this method.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function uninstall($parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_UNINSTALL_TEXT&#039;) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is updated.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function update($parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::sprintf(&#039;COM_HELLOWORLD_UPDATE_TEXT&#039;, $parent-&amp;gt;get(&#039;manifest&#039;)-&amp;gt;version) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs just before any installation action is preformed on the component.&lt;br /&gt;
     * Verifications and pre-requisites should run in this function.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  string    $type   - Type of PreFlight action. Possible values are:&lt;br /&gt;
     *                           - * install&lt;br /&gt;
     *                           - * update&lt;br /&gt;
     *                           - * discover_install&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function preflight($type, $parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_PREFLIGHT_&#039; . $type . &#039;_TEXT&#039;) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs right after any installation action is preformed on the component.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  string    $type   - Type of PostFlight action. Possible values are:&lt;br /&gt;
     *                           - * install&lt;br /&gt;
     *                           - * update&lt;br /&gt;
     *                           - * discover_install&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    function postflight($type, $parent) &lt;br /&gt;
    {&lt;br /&gt;
		$db = JFactory::getDbo();&lt;br /&gt;
		&lt;br /&gt;
		echo &#039;&amp;lt;p&amp;gt;Checking if the root record is already present ...&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
		&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
		$query-&amp;gt;select(&#039;id&#039;);&lt;br /&gt;
		$query-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
		$query-&amp;gt;where(&#039;id = 1&#039;);&lt;br /&gt;
		$query-&amp;gt;where(&#039;alias = &amp;quot;helloworld-root-alias&amp;quot;&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$id = $db-&amp;gt;loadResult();&lt;br /&gt;
		&lt;br /&gt;
		if ($id == &#039;1&#039;)&lt;br /&gt;
		{   // assume tree structure already built&lt;br /&gt;
			echo &#039;&amp;lt;p&amp;gt;Root record already present, install program exiting ...&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		echo &#039;&amp;lt;p&amp;gt;Checking if there is a record with id = 1 ...&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
		&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
		$query-&amp;gt;select(&#039;id&#039;);&lt;br /&gt;
		$query-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
		$query-&amp;gt;where(&#039;id = 1&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$id = $db-&amp;gt;loadResult();&lt;br /&gt;
			&lt;br /&gt;
		if ($id)&lt;br /&gt;
		{&lt;br /&gt;
			echo &#039;&amp;lt;p&amp;gt;Record with id = 1 found&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
			&lt;br /&gt;
			// get new id&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;select(&#039;max(id) + 1&#039;)&lt;br /&gt;
				-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$newid = $db-&amp;gt;loadResult(); &lt;br /&gt;
			echo &amp;quot;&amp;lt;p&amp;gt;Changing id to $newid&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			&lt;br /&gt;
			// update id in helloworld table&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__helloworld&#039;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;id = $newid&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&amp;quot;id = $id&amp;quot;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Id in helloworld table changed, records updated: $nrows&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error: Id in helloworld table not changed&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			// update id in the associations table&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__associations&#039;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;id = $newid&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&amp;quot;id = $id&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&#039;context = &amp;quot;com_helloworld.item&amp;quot;&#039;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Id in associations table changed, records updated: $nrows&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error: Id in associations table not changed&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			// update id in the assets table&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__assets&#039;)&lt;br /&gt;
				-&amp;gt;set(&#039;name = &amp;quot;com_helloworld.helloworld.&#039; . $newid . &#039;&amp;quot;&#039;)&lt;br /&gt;
				-&amp;gt;where(&#039;name = &amp;quot;com_helloworld.helloworld.&#039; . $id . &#039;&amp;quot;&#039;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Id in assets table changed, records updated: $nrows&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error: Id in assets table not changed&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else &lt;br /&gt;
		{&lt;br /&gt;
			echo &#039;&amp;lt;p&amp;gt;No record with id = 1 found&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// find number of records in helloworld table&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;count(*)&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$total = $db-&amp;gt;loadResult(); &lt;br /&gt;
		&lt;br /&gt;
		// insert root record&lt;br /&gt;
		$columns = array(&#039;id&#039;,&#039;greeting&#039;,&#039;alias&#039;,&#039;parent_id&#039;,&#039;rgt&#039;);&lt;br /&gt;
		$values = array(1, &#039;helloworld root&#039;,&#039;helloworld-root-alias&#039;,0, 2 * (int)$total + 1);&lt;br /&gt;
&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;insert(&#039;#__helloworld&#039;)&lt;br /&gt;
			-&amp;gt;columns($db-&amp;gt;quoteName($columns))&lt;br /&gt;
			-&amp;gt;values(implode(&#039;,&#039;, $db-&amp;gt;quote($values)));&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$result = $db-&amp;gt;execute();&lt;br /&gt;
		if ($result)&lt;br /&gt;
		{&lt;br /&gt;
			$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
			echo &amp;quot;&amp;lt;p&amp;gt;$nrows inserted into helloworld table&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			echo &amp;quot;&amp;lt;p&amp;gt;Error creating root record&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			var_dump($result);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// update lft and rgt for each of the other records (ie not root)&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;id&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld&#039;)&lt;br /&gt;
			-&amp;gt;where(&#039;id &amp;gt; 1&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$ids = $db-&amp;gt;loadColumn(); &lt;br /&gt;
		for ($i = 0; $i &amp;lt; $total; $i++)&lt;br /&gt;
		{&lt;br /&gt;
			$lft = 2 * (int)$i + 1;&lt;br /&gt;
			$rgt = 2 * (int)$i + 2;&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__helloworld&#039;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;lft = {$lft}&amp;quot;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;rgt = {$rgt}&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&amp;quot;id = {$ids[$i]}&amp;quot;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;$nrows updated in helloworld table, for id = {$ids[$i]}&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error updating record&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Helloworlds MVC == &amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt; Updated model file to include the new fields. The default ordering has been set to be based on the tree structure, as it&#039;s arguably more appropriate than being based on the greeting.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;37,47,86-87,153-154,157&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
        /**&lt;br /&gt;
         * Constructor.&lt;br /&gt;
         *&lt;br /&gt;
         * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
         *&lt;br /&gt;
         * @see     JController&lt;br /&gt;
         * @since   1.6&lt;br /&gt;
         */&lt;br /&gt;
        public function __construct($config = array())&lt;br /&gt;
        {&lt;br /&gt;
                if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
                {&lt;br /&gt;
                        $config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
                                &#039;id&#039;,&lt;br /&gt;
                                &#039;greeting&#039;,&lt;br /&gt;
                                &#039;author&#039;,&lt;br /&gt;
                                &#039;created&#039;,&lt;br /&gt;
                                &#039;language&#039;,&lt;br /&gt;
                                &#039;lft&#039;,&lt;br /&gt;
                                &#039;category_id&#039;,&lt;br /&gt;
                                &#039;association&#039;,&lt;br /&gt;
                                &#039;published&#039;&lt;br /&gt;
                        );&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($config);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        protected function populateState($ordering = &#039;lft&#039;, $direction = &#039;asc&#039;)&lt;br /&gt;
        {&lt;br /&gt;
                $app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
                // Adjust the context to support modal layouts.&lt;br /&gt;
                if ($layout = $app-&amp;gt;input-&amp;gt;get(&#039;layout&#039;))&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;context .= &#039;.&#039; . $layout;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Adjust the context to support forced languages.&lt;br /&gt;
                $forcedLanguage = $app-&amp;gt;input-&amp;gt;get(&#039;forcedLanguage&#039;, &#039;&#039;, &#039;CMD&#039;);&lt;br /&gt;
                if ($forcedLanguage)&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;context .= &#039;.&#039; . $forcedLanguage;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                parent::populateState($ordering, $direction);&lt;br /&gt;
        &lt;br /&gt;
                // If there&#039;s a forced language then define that filter for the query where clause&lt;br /&gt;
                if (!empty($forcedLanguage))&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;setState(&#039;filter.language&#039;, $forcedLanguage);&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /**&lt;br /&gt;
         * Method to build an SQL query to load the list data.&lt;br /&gt;
         *&lt;br /&gt;
         * @return      string  An SQL query&lt;br /&gt;
         */&lt;br /&gt;
        protected function getListQuery()&lt;br /&gt;
        {&lt;br /&gt;
                // Initialize variables.&lt;br /&gt;
                $db    = JFactory::getDbo();&lt;br /&gt;
                $query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
                // Create the base select statement.&lt;br /&gt;
                $query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created, &lt;br /&gt;
                          a.checked_out as checked_out, a.checked_out_time as checked_out_time, a.catid as catid,&lt;br /&gt;
                          a.lft as lft, a.rgt as rgt, a.parent_id as parent_id, a.level as level, a.path as path,&lt;br /&gt;
                          a.image as imageInfo, a.latitude as latitude, a.longitude as longitude, a.alias as alias, a.language as language&#039;)&lt;br /&gt;
                          -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
                // Join over the categories.&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
                // Join with users table to get the username of the author&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join with users table to get the username of the person who checked the record out&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u2.username&#039;, &#039;editor&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u2&#039;) . &#039; ON u2.id = a.checked_out&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join with languages table to get the language title and image to display&lt;br /&gt;
                // Put these into fields called language_title and language_image so that &lt;br /&gt;
                // we can use the little com_content layout to display the map symbol&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;l.title&#039;, &#039;language_title&#039;) . &amp;quot;,&amp;quot; .$db-&amp;gt;quoteName(&#039;l.image&#039;, &#039;language_image&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__languages&#039;, &#039;l&#039;) . &#039; ON l.lang_code = a.language&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join over the associations - we just want to know if there are any, at this stage&lt;br /&gt;
                if (JLanguageAssociations::isEnabled())&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;select(&#039;COUNT(asso2.id)&amp;gt;1 as association&#039;)&lt;br /&gt;
                                -&amp;gt;join(&#039;LEFT&#039;, &#039;#__associations AS asso ON asso.id = a.id AND asso.context=&#039; . $db-&amp;gt;quote(&#039;com_helloworld.item&#039;))&lt;br /&gt;
                                -&amp;gt;join(&#039;LEFT&#039;, &#039;#__associations AS asso2 ON asso2.key = asso.key&#039;)&lt;br /&gt;
                                -&amp;gt;group(&#039;a.id&#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter: like / search&lt;br /&gt;
                $search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
                if (!empty($search))&lt;br /&gt;
                {&lt;br /&gt;
                        $like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
                        $query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by published state&lt;br /&gt;
                $published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
                if (is_numeric($published))&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
                }&lt;br /&gt;
                elseif ($published === &#039;&#039;)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by language, if the user has set that in the filter field&lt;br /&gt;
                $language = $this-&amp;gt;getState(&#039;filter.language&#039;);&lt;br /&gt;
                if ($language)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;a.language = &#039; . $db-&amp;gt;quote($language));&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by categories&lt;br /&gt;
                $catid = $this-&amp;gt;getState(&#039;filter.category_id&#039;);&lt;br /&gt;
                if ($catid)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&amp;quot;a.catid = &amp;quot; . $db-&amp;gt;quote($db-&amp;gt;escape($catid)));&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // exclude root helloworld record&lt;br /&gt;
                $query-&amp;gt;where(&#039;a.id &amp;gt; 1&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Add the list ordering clause.&lt;br /&gt;
                $orderCol       = $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;lft&#039;);&lt;br /&gt;
                $orderDirn      = $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
                $query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
                return $query;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; In our view file we create a mapping of parent id to the ids of its children. This enables us to find more easily the successive parents of a record up the hierarchy, which we&#039;ll do in the layout file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;70-75&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
        /**&lt;br /&gt;
         * Display the Hello World view&lt;br /&gt;
         *&lt;br /&gt;
         * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
         *&lt;br /&gt;
         * @return  void&lt;br /&gt;
         */&lt;br /&gt;
        function display($tpl = null)&lt;br /&gt;
        {&lt;br /&gt;
                // Get application&lt;br /&gt;
                $app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
                // Get data from the model&lt;br /&gt;
                $this-&amp;gt;items                    = $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
                $this-&amp;gt;pagination               = $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
                $this-&amp;gt;state                    = $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
                $this-&amp;gt;filterForm       = $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
                $this-&amp;gt;activeFilters    = $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
                // What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
                $this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Check for errors.&lt;br /&gt;
                if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
                {&lt;br /&gt;
                        JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
                        return false;&lt;br /&gt;
                }&lt;br /&gt;
        &lt;br /&gt;
                // Set the sidebar submenu and toolbar, but not on the modal window&lt;br /&gt;
                if ($this-&amp;gt;getLayout() !== &#039;modal&#039;)&lt;br /&gt;
                {&lt;br /&gt;
                        HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
                        $this-&amp;gt;addToolBar();&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                        // If it&#039;s being displayed to select a record as an association, then forcedLanguage is set&lt;br /&gt;
                        if ($forcedLanguage = $app-&amp;gt;input-&amp;gt;get(&#039;forcedLanguage&#039;, &#039;&#039;, &#039;CMD&#039;))&lt;br /&gt;
                        {&lt;br /&gt;
                                // Transform the language selector filter into an hidden field, so it can&#039;t be set&lt;br /&gt;
                                $languageXml = new SimpleXMLElement(&#039;&amp;lt;field name=&amp;quot;language&amp;quot; type=&amp;quot;hidden&amp;quot; default=&amp;quot;&#039; . $forcedLanguage . &#039;&amp;quot; /&amp;gt;&#039;);&lt;br /&gt;
                                $this-&amp;gt;filterForm-&amp;gt;setField($languageXml, &#039;filter&#039;, true);&lt;br /&gt;
&lt;br /&gt;
                                // Also, unset the active language filter so the search tools is not open by default with this filter.&lt;br /&gt;
                                unset($this-&amp;gt;activeFilters[&#039;language&#039;]);&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Prepare a mapping from parent id to the ids of its children&lt;br /&gt;
                $this-&amp;gt;ordering = array();&lt;br /&gt;
                foreach ($this-&amp;gt;items as $item)&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;ordering[$item-&amp;gt;parent_id][] = $item-&amp;gt;id;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Display the template&lt;br /&gt;
                parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
                // Set the document&lt;br /&gt;
                $this-&amp;gt;setDocument();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /**&lt;br /&gt;
         * Add the page title and toolbar.&lt;br /&gt;
         *&lt;br /&gt;
         * @return  void&lt;br /&gt;
         *&lt;br /&gt;
         * @since   1.6&lt;br /&gt;
         */&lt;br /&gt;
        protected function addToolBar()&lt;br /&gt;
        {&lt;br /&gt;
                $title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
                if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
                {&lt;br /&gt;
                        $title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;) || JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_checkin&#039;))&lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::checkin(&#039;helloworlds.checkin&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::divider();&lt;br /&gt;
                        JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        /**&lt;br /&gt;
         * Method to set up the document properties&lt;br /&gt;
         *&lt;br /&gt;
         * @return void&lt;br /&gt;
         */&lt;br /&gt;
        protected function setDocument() &lt;br /&gt;
        {&lt;br /&gt;
                $document = JFactory::getDocument();&lt;br /&gt;
                $document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; In our layout file we include new columns for the lft, rgt, level and parent fields (although with headings which are just the database field names rather than translated strings), and include the path in small letters below the alias under the greeting. We also change the parameters for the javascript in &amp;lt;tt&amp;gt;sortablelist.js&amp;lt;/tt&amp;gt; which enables the dragging of rows to reorder the rows which have the same parent.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; This javascript code hides all the descendants (not just immediate children) when dragging is being performed, so for each row there&#039;s a little work to create a list of the successive parents of that row, going up the tree hierarchy, which is then put into the parents attribute of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr&amp;amp;gt;&amp;lt;/tt&amp;gt; element. When a row with id=xxx is being dragged, the javascript then hides any row in which the id xxx appears in this parents attribute.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;21,25-26,52,58,61,64,67-78,80,114-138,140,157,165-166,180-182,194-205&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
$user = JFactory::getUser();&lt;br /&gt;
$userId = $user-&amp;gt;get(&#039;id&#039;);&lt;br /&gt;
$saveOrder = ($listOrder == &#039;lft&#039; &amp;amp;&amp;amp; strtolower($listDirn) == &#039;asc&#039;);&lt;br /&gt;
if ($saveOrder)&lt;br /&gt;
{&lt;br /&gt;
        $saveOrderingUrl = &#039;index.php?option=com_helloworld&amp;amp;task=helloworlds.saveOrderAjax&amp;amp;tmpl=component&#039;;&lt;br /&gt;
        // pass true as parameter 7 to indicate that we have a nested set&lt;br /&gt;
        JHtml::_(&#039;sortablelist.sortable&#039;, &#039;helloworldList&#039;, &#039;adminForm&#039;, strtolower($listDirn), $saveOrderingUrl, false, true);&lt;br /&gt;
}&lt;br /&gt;
$assoc = JLanguageAssociations::isEnabled();&lt;br /&gt;
$authorFieldwidth = $assoc ? &amp;quot;10%&amp;quot; : &amp;quot;25%&amp;quot;;&lt;br /&gt;
JLoader::register(&#039;JHtmlHelloworlds&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_helloworld/helpers/html/helloworlds.php&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot; id=&amp;quot;helloworldList&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;&#039;, &#039;lft&#039;, $listDirn, $listOrder, null, &#039;asc&#039;, &#039;JGRID_HEADING_ORDERING&#039;, &#039;icon-menu-2&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_POSITION&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_IMAGE&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;lft&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;rgt&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;level&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;parent&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS&#039;, &#039;association&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;&amp;lt;?php echo $authorFieldwidth; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_LANGUAGE&#039;, &#039;language&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                        $row-&amp;gt;image = new Registry;&lt;br /&gt;
                        $row-&amp;gt;image-&amp;gt;loadString($row-&amp;gt;imageInfo);&lt;br /&gt;
                        // create a list of the parents up the hierarchy to the root &lt;br /&gt;
                        if ($row-&amp;gt;level &amp;gt; 1)&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                            $_currentParentId = $row-&amp;gt;parent_id;&lt;br /&gt;
                            $parentsStr = &#039; &#039; . $_currentParentId;&lt;br /&gt;
                            for ($j = 0; $j &amp;lt; $row-&amp;gt;level; $j++)&lt;br /&gt;
                            {&lt;br /&gt;
                                foreach ($this-&amp;gt;ordering as $k =&amp;gt; $v)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $v = implode(&#039;-&#039;, $v);&lt;br /&gt;
                                    $v = &#039;-&#039; . $v . &#039;-&#039;;&lt;br /&gt;
                                    if (strpos($v, &#039;-&#039; . $_currentParentId . &#039;-&#039;) !== false)&lt;br /&gt;
                                    {&lt;br /&gt;
                                        $parentsStr .= &#039; &#039; . $k;&lt;br /&gt;
                                        $_currentParentId = $k;&lt;br /&gt;
                                        break;&lt;br /&gt;
                                    }&lt;br /&gt;
                                }&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        else&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                        }&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr class=&amp;quot;row&amp;lt;?php echo $i % 2; ?&amp;gt;&amp;quot; sortable-group-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;parent_id; ?&amp;gt;&amp;quot; item-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&amp;quot; parents=&amp;quot;&amp;lt;?php echo $parentsStr; ?&amp;gt;&amp;quot; level=&amp;quot;&amp;lt;?php echo $row-&amp;gt;level; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php&lt;br /&gt;
                                $iconClass = &#039;&#039;;&lt;br /&gt;
                                $canReorder  = $user-&amp;gt;authorise(&#039;core.edit.state&#039;, &#039;com_helloworld.helloworld.&#039; . $row-&amp;gt;id);&lt;br /&gt;
                                if (!$canReorder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive&#039;;&lt;br /&gt;
                                }&lt;br /&gt;
                                elseif (!$saveOrder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive tip-top hasTooltip&amp;quot; title=&amp;quot;&#039; . JHtml::_(&#039;tooltipText&#039;, &#039;JORDERINGDISABLED&#039;);&lt;br /&gt;
                                }&lt;br /&gt;
                                ?&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;sortable-handler&amp;lt;?php echo $iconClass ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;span class=&amp;quot;icon-menu&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($canReorder &amp;amp;&amp;amp; $saveOrder) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;input type=&amp;quot;text&amp;quot; style=&amp;quot;display:none&amp;quot; name=&amp;quot;order[]&amp;quot; size=&amp;quot;5&amp;quot; value=&amp;quot;&amp;lt;?php echo $row-&amp;gt;lft; ?&amp;gt;&amp;quot; class=&amp;quot;width-20 text-area-order&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $row-&amp;gt;level)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($row-&amp;gt;checked_out) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php $canCheckin = $user-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_checkin&#039;) || $row-&amp;gt;checked_out == $userId; ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JHtml::_(&#039;jgrid.checkedout&#039;, $i, $row-&amp;gt;editor, $row-&amp;gt;checked_out_time, &#039;helloworlds.&#039;, $canCheckin); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;small break-word&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JText::sprintf(&#039;JGLOBAL_LIST_ALIAS&#039;, $this-&amp;gt;escape($row-&amp;gt;alias)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo &#039;Path: &#039; . $this-&amp;gt;escape($row-&amp;gt;path); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo &amp;quot;[&amp;quot; . $row-&amp;gt;latitude . &amp;quot;, &amp;quot; . $row-&amp;gt;longitude . &amp;quot;]&amp;quot;; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php&lt;br /&gt;
                                    $caption = $row-&amp;gt;image-&amp;gt;get(&#039;caption&#039;) ? : &#039;&#039; ;&lt;br /&gt;
                                    $src = JURI::root() . ($row-&amp;gt;image-&amp;gt;get(&#039;image&#039;) ? : &#039;&#039; );&lt;br /&gt;
                                    $html = &#039;&amp;lt;p class=&amp;quot;hasTooltip&amp;quot; style=&amp;quot;display: inline-block&amp;quot; data-html=&amp;quot;true&amp;quot; data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;&amp;lt;img width=\&#039;100px\&#039; height=\&#039;100px\&#039; src=\&#039;%s\&#039;&amp;gt;&amp;quot;&amp;gt;%s&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
                                    echo sprintf($html, $src, $caption);  ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;lft; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;rgt; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;level; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;parent_id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                                &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php if ($row-&amp;gt;association) : ?&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JHtml::_(&#039;helloworlds.association&#039;, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JLayoutHelper::render(&#039;joomla.content.language&#039;, $row); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; We also need to change &amp;quot;ordering&amp;quot; option within the filter fields to use the &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt; database field instead of the &amp;lt;tt&amp;gt;ordering&amp;lt;/tt&amp;gt; field which we had in the previous step, and make the default ordering by &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;48,51-52&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;language&amp;quot;&lt;br /&gt;
			type=&amp;quot;contentlanguage&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_FILTER_LANGUAGE&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_FILTER_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_LANGUAGE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;category_id&amp;quot;&lt;br /&gt;
			type=&amp;quot;category&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_FILTER_CATEGORY&amp;quot;&lt;br /&gt;
			extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			published=&amp;quot;0,1,2&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;lft ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;language ASC&amp;quot;&amp;gt;COM_HELLOWORLD_LANGUAGE_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;language DESC&amp;quot;&amp;gt;COM_HELLOWORLD_LANGUAGE_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;association ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ASSOCIATION_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;association DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ASSOCIATION_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Helloworld Edit Form == &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt; The form is updated to include the 2 new input elements for capturing the parent and the ordering.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; The helloworldparent field will result in a &amp;lt;tt&amp;gt;jform[&#039;parent_id&#039;]&amp;lt;/tt&amp;gt; parameter being passed in the HTTP POST from the form, and this will be mapped to the &amp;lt;tt&amp;gt;parent_id&amp;lt;/tt&amp;gt; field of the record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:58--&amp;gt; The helloworldordering field will result in a &amp;lt;tt&amp;gt;jform[&#039;helloworldordering&#039;]&amp;lt;/tt&amp;gt; parameter containing the id of the sibling below which this record should be placed, or a special value of -1 (to set it as the first child) or -2 (to set it as the last child). This field doesn&#039;t map to a field in the database, but will be used to position the location of the edited record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;74-89&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
				addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox validate-greeting&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;latitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-90.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;90.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;longitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-180.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;180.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;language&amp;quot; &lt;br /&gt;
				type=&amp;quot;contentlanguage&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_ORDERING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ORDERING_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&lt;br /&gt;
				size=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;imageinfo&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;image-info&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_IMAGE_FIELDS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;image&amp;quot;&lt;br /&gt;
				type=&amp;quot;media&amp;quot;&lt;br /&gt;
				preview=&amp;quot;tooltip&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;field name=&amp;quot;alt&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;field name=&amp;quot;caption&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;params&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELDSET_DISPLAY_OPTIONS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
					type=&amp;quot;list&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
					default=&amp;quot;&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_USE_GLOBAL&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;accesscontrol&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FIELDSET_RULES&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;asset_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				filter=&amp;quot;unset&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;rules&amp;quot;&lt;br /&gt;
				type=&amp;quot;rules&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_FIELD_RULES_LABEL&amp;quot;&lt;br /&gt;
				filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
				validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				section=&amp;quot;message&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt; Both of the two new input elements are custom fields, so we will need to provide definitions of them in two new files within the &amp;lt;tt&amp;gt;admin/models/fields&amp;lt;/tt&amp;gt; directory. Firstly the parent:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/fields/helloworldparent.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/fields/helloworldparent.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Class associated with displaying an input field to capture the parent of a helloworld record&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;JPATH_BASE&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
JFormHelper::loadFieldClass(&#039;list&#039;);&lt;br /&gt;
&lt;br /&gt;
class JFormFieldHelloworldParent extends JFormFieldList&lt;br /&gt;
{&lt;br /&gt;
	protected $type = &#039;HelloworldParent&#039;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the field options for the parent&lt;br /&gt;
	 *&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getOptions()&lt;br /&gt;
	{&lt;br /&gt;
		$options = array();&lt;br /&gt;
&lt;br /&gt;
		$db = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;DISTINCT(a.id) AS value, a.greeting AS text, a.level, a.lft&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld AS a&#039;);&lt;br /&gt;
		&lt;br /&gt;
		// Prevent parenting to children of this record, or to itself&lt;br /&gt;
		// If this record has lft = x and rgt = y, then its children have lft &amp;gt; x and rgt &amp;lt; y&lt;br /&gt;
		if ($id = $this-&amp;gt;form-&amp;gt;getValue(&#039;id&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__helloworld&#039;) . &#039; AS h ON h.id = &#039; . (int) $id)&lt;br /&gt;
				-&amp;gt;where(&#039;NOT(a.lft &amp;gt;= h.lft AND a.rgt &amp;lt;= h.rgt)&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$query-&amp;gt;order(&#039;a.lft ASC&#039;);&lt;br /&gt;
		&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			$options = $db-&amp;gt;loadObjectList();&lt;br /&gt;
		}&lt;br /&gt;
		catch (RuntimeException $e)&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseWarning(500, $e-&amp;gt;getMessage());&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// Pad the option text with spaces using depth level as a multiplier.&lt;br /&gt;
		for ($i = 0; $i &amp;lt; count($options); $i++)&lt;br /&gt;
		{&lt;br /&gt;
			$options[$i]-&amp;gt;text = str_repeat(&#039;- &#039;, $options[$i]-&amp;gt;level) . $options[$i]-&amp;gt;text;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Merge any additional options in the XML definition.&lt;br /&gt;
		$options = array_merge(parent::getOptions(), $options);&lt;br /&gt;
&lt;br /&gt;
		return $options;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; And secondly, the ordering&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/fields/helloworldordering.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/fields/helloworldordering.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Class for displaying the Ordering field in the helloworld edit layout&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;JPATH_BASE&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
JFormHelper::loadFieldClass(&#039;list&#039;);&lt;br /&gt;
&lt;br /&gt;
class JFormFieldHelloworldOrdering extends JFormFieldList&lt;br /&gt;
{&lt;br /&gt;
	protected $type = &#039;HelloworldOrdering&#039;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the options for ordering the helloworld record&lt;br /&gt;
	 * This is the list of siblings the record&#039;s siblings - ie those records with the same parent.&lt;br /&gt;
	 * The method requires that parent id be set.&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getOptions()&lt;br /&gt;
	{&lt;br /&gt;
		$options = array();&lt;br /&gt;
&lt;br /&gt;
		// Get the parent&lt;br /&gt;
		$parent_id = $this-&amp;gt;form-&amp;gt;getValue(&#039;parent_id&#039;, 0);&lt;br /&gt;
&lt;br /&gt;
		if (empty($parent_id))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$db = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;a.id AS value, a.greeting AS text&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld AS a&#039;)&lt;br /&gt;
			-&amp;gt;where(&#039;a.parent_id =&#039; . (int) $parent_id);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order(&#039;a.lft ASC&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Get the options.&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			$options = $db-&amp;gt;loadObjectList();&lt;br /&gt;
		}&lt;br /&gt;
		catch (RuntimeException $e)&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseWarning(500, $e-&amp;gt;getMessage());&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$options = array_merge(&lt;br /&gt;
			array(array(&#039;value&#039; =&amp;gt; &#039;-1&#039;, &#039;text&#039; =&amp;gt; JText::_(&#039;COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_FIRST&#039;))),&lt;br /&gt;
			$options,&lt;br /&gt;
			array(array(&#039;value&#039; =&amp;gt; &#039;-2&#039;, &#039;text&#039; =&amp;gt; JText::_(&#039;COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_LAST&#039;)))&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// Merge any additional options in the XML definition.&lt;br /&gt;
		$options = array_merge(parent::getOptions(), $options);&lt;br /&gt;
&lt;br /&gt;
		return $options;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the field input markup.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  string  The field input markup.&lt;br /&gt;
	 *&lt;br /&gt;
	 * This method returns the input element except if a new record is being created, in which case a text string is output&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getInput()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;form-&amp;gt;getValue(&#039;id&#039;, 0) == 0)&lt;br /&gt;
		{&lt;br /&gt;
			return &#039;&amp;lt;span class=&amp;quot;readonly&amp;quot;&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_ITEM_FIELD_ORDERING_TEXT&#039;) . &#039;&amp;lt;/span&amp;gt;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			return parent::getInput();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Handling Admin Record Updates == &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; Our Helloworld model and Helloworld table code together handle the updates arising from admin operations on the helloworld edit form and on the helloworlds view. With reference to the two updated files below, here&#039;s how these updates are processed.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; &#039;&#039;&#039;Dragging a row to reorder&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
* The dragging is handled within the javascript code in sortablelist.js, and the updated order is sent to the server via an Ajax call to task=helloworlds.saveOrderAjax. &lt;br /&gt;
* The code within the Admin Controller saveOrderAjax() method calls our model saveorder() function.&lt;br /&gt;
* Our model saveorder() in turn calls the saveorder() within JTableNested&lt;br /&gt;
* JTableNested::saveorder() executes the database updates.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt; &#039;&#039;&#039;Deleting records&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt; Clicking the Delete button in the helloworlds view causes an HTTP POST with task=helloworlds.delete and the list of record ids to delete (from the checkboxes which have been checked)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt; The Admin Controller delete() calls the delete() function in the model, passing the array of ids to be deleted.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:68--&amp;gt; As we don&#039;t have a specific delete() function in our helloworld model, this results in the parent Admin Model delete() being called. This function gets the table instance from the model and for each id in the array it calls the table delete() method, passing the id as the single parameter.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:69--&amp;gt; The table delete() method invoked is the delete() in our Helloworld Table class. We&#039;ve overridden the JNestedTable delete() method because if just a single parameter is passed to JNestedTable::delete() then it deletes the children as well as the record. We override it so that the default is NOT to delete the children.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:70--&amp;gt; JNestedTable::delete() deletes the record, and moves each of its children up the hierarchy, to be parented on the deleted record&#039;s parent.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:71--&amp;gt; &#039;&#039;&#039;Edit record to change the parent&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:72--&amp;gt; Clicking Save causes an HTTP post with task=helloworld.save which gets handled by JControllerForm::save(). This function calls the model save().&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:73--&amp;gt; This invokes our helloworld model save() which calls the parent::save() which is in JModelAdmin.&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:74--&amp;gt; JModelAdmin::save() calls table load() to load the existing values, then table bind() to bind the new values&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt; This invokes our Helloworld table bind() function, which checks if the new parent is the same as the existing parent, and when it finds it isn&#039;t it calls table setLocation() to set the position as the last child of that parent&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt; JTableNested::setLocation() stores the parent and the position (ie &#039;last child&#039;) in instance variables&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:77--&amp;gt; Back in JModelAdmin::save() it calls table store().&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt; This invokes JTableNested::store() which moves the edited record and all of its descendants under the new parent record, based on the previously stored instance variables. This fixes the lft and rgt values of all the records in the helloworld database table. However, it doesn&#039;t fix up the path field of the records which have been moved.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt; Back in our helloworld model save() we call the JTableNested rebuild() method to rebuild the whole database table. This is rather a crude method for fixing up the path fields of the moved records. However, if we don&#039;t use in our code the path field then we can omit this step.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:80--&amp;gt; &#039;&#039;&#039;Edit record to change the ordering (but not the parent)&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:81--&amp;gt; Clicking Save causes an HTTP post with task=helloworld.save and jform[&#039;helloworldordering&#039;] set to the id of the field below which we&#039;re positioning this record (or set to -1 (first child) or -2 (last child) as special cases). This POST gets handled by JControllerForm::save() which calls the model save().&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:82--&amp;gt; This invokes our helloworld model save() which calls the parent::save() which is in JModelAdmin.&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:83--&amp;gt; JModelAdmin::save() calls table load() to load the existing values, then table bind() to bind the new values&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt; This invokes our Helloworld table bind() function, which checks if the new parent is the same as the existing parent, and when it finds it is then it calls table setLocation() to set the position as after the record id in the &#039;helloworldordering&#039; element of the array (and handling the special cases of -1 or -2).&amp;lt;/translate&amp;gt; &lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt; JTableNested::setLocation() stores the (unchanged) parent and the position in instance variables&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:86--&amp;gt; Back in JModelAdmin::save() it calls table store().&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:87--&amp;gt; This invokes JTableNested::store() which moves the edited record based on the new position stored in its instance variable. This fixes the lft and rgt values of all the records in the helloworld database table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:88--&amp;gt; Back in our helloworld model save() we call the JTableNested rebuild() method to rebuild the whole database table. This is very inefficient as there is no need to rebuild the paths in this case!&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:89--&amp;gt; &#039;&#039;&#039;New and Save as Copy&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:90--&amp;gt; Both of these result in an HTTP POST which get handled by JControllerForm::save() which calls the model save(). In the array of data for the new record the id is either not set or set to 0.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt; This invokes our helloworld model save() which calls the parent::save() which is in JModelAdmin.&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:92--&amp;gt; JModelAdmin::save() calls table load() to load the existing values, then table bind() to bind the new values&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:93--&amp;gt; This invokes our Helloworld table bind() function, which checks the &#039;id&#039; element of the array to see if it&#039;s a new record. When it finds it is then it calls table setLocation() to set the position as the last child of the record defined in the &#039;parent_id&#039; array element.&amp;lt;/translate&amp;gt; &lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:94--&amp;gt; JTableNested::setLocation() stores the parent and the (last child) position in instance variables&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:95--&amp;gt; Back in JModelAdmin::save() it calls table store().&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:96--&amp;gt; This invokes JTableNested::store() which updates the lft and rgt fields in the table to make room for the new record to be inserted at the position specified by the instance variables set in the setLocation() call. This fixes the lft and rgt values of all the records in the helloworld database table, but doesn&#039;t set the path of our new record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:97--&amp;gt; Back in our helloworld model save() we call the JTableNested rebuild() method to rebuild the whole database table. This is again very inefficient as we should really only be calling the JTableNested rebuildPath() method to set the path of the new record!&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:98--&amp;gt; &#039;&#039;&#039;Addressing the rebuild problem&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:99--&amp;gt; The inefficiencies associated with having to call the rebuild() method are significant, particularly because it results in the whole helloworld table being processed for all record updates, even if the update is not concerned with adjusting a record&#039;s position in the tree. There are various alternatives to address this issue:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:100--&amp;gt; If you don&#039;t use the path field in your code then you can just ignore it and not bother calling rebuild() to fix it.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:101--&amp;gt; As described in the video accompanying this tutorial step, you can follow the example of com_content and put the code for save() into the helloworld model, rather than calling the parent Admin Model save() to do the work.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:102--&amp;gt; In the helloworld model save() for a record update you can load the existing record from the database, compare its parent id with the data from the form, and call rebuild() only if the parent id is different.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:103--&amp;gt; Our updated model is below. Note that the code has been removed from prepareTable() as defining the order of the records is now done in the bind() method of our helloworld table class.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039; highlight=&amp;quot;214-219,235-236,238-254&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
	// JModelAdmin needs to know this for storing the associations &lt;br /&gt;
	protected $associationsContext = &#039;com_helloworld.item&#039;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override getItem to allow us to convert the JSON-encoded image information&lt;br /&gt;
	 * in the database record into an array for subsequent prefilling of the edit form&lt;br /&gt;
	 * We also use this method to prefill the associations&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($pk = null)&lt;br /&gt;
	{&lt;br /&gt;
		$item = parent::getItem($pk);&lt;br /&gt;
		if ($item AND property_exists($item, &#039;image&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			$registry = new Registry($item-&amp;gt;image);&lt;br /&gt;
			$item-&amp;gt;imageinfo = $registry-&amp;gt;toArray();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Load associated items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$item-&amp;gt;associations = array();&lt;br /&gt;
&lt;br /&gt;
			if ($item-&amp;gt;id != null)&lt;br /&gt;
			{&lt;br /&gt;
				$associations = JLanguageAssociations::getAssociations(&#039;com_helloworld&#039;, &#039;#__helloworld&#039;, &#039;com_helloworld.item&#039;, (int)$item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
				foreach ($associations as $tag =&amp;gt; $association)&lt;br /&gt;
				{&lt;br /&gt;
					$item-&amp;gt;associations[$tag] = $association-&amp;gt;id;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $item; &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.helloworld&#039;,&lt;br /&gt;
			&#039;helloworld&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to preprocess the form to add the association fields dynamically&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return     none&lt;br /&gt;
	 */&lt;br /&gt;
	protected function preprocessForm(JForm $form, $data, $group = &#039;helloworld&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		// Association content items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$languages = JLanguageHelper::getContentLanguages(false, true, null, &#039;ordering&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
			if (count($languages) &amp;gt; 1)&lt;br /&gt;
			{&lt;br /&gt;
				$addform = new SimpleXMLElement(&#039;&amp;lt;form /&amp;gt;&#039;);&lt;br /&gt;
				$fields = $addform-&amp;gt;addChild(&#039;fields&#039;);&lt;br /&gt;
				$fields-&amp;gt;addAttribute(&#039;name&#039;, &#039;associations&#039;);&lt;br /&gt;
				$fieldset = $fields-&amp;gt;addChild(&#039;fieldset&#039;);&lt;br /&gt;
				$fieldset-&amp;gt;addAttribute(&#039;name&#039;, &#039;item_associations&#039;);&lt;br /&gt;
&lt;br /&gt;
				foreach ($languages as $language)&lt;br /&gt;
				{&lt;br /&gt;
					$field = $fieldset-&amp;gt;addChild(&#039;field&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;name&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;type&#039;, &#039;modal_helloworld&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;language&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;label&#039;, $language-&amp;gt;title);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;translate_label&#039;, &#039;false&#039;);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				$form-&amp;gt;load($addform, false);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		parent::preprocessForm($form, $data, $group);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($data))&lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override the JModelAdmin save() function to handle Save as Copy correctly&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   The helloworld record data submitted from the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  parent::save() return value&lt;br /&gt;
	 */&lt;br /&gt;
	public function save($data)&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		JLoader::register(&#039;CategoriesHelper&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_categories/helpers/categories.php&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Validate the category id&lt;br /&gt;
		// validateCategoryId() returns 0 if the catid can&#039;t be found&lt;br /&gt;
		if ((int) $data[&#039;catid&#039;] &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			$data[&#039;catid&#039;] = CategoriesHelper::validateCategoryId($data[&#039;catid&#039;], &#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Alter the greeting and alias for save as copy&lt;br /&gt;
		if ($input-&amp;gt;get(&#039;task&#039;) == &#039;save2copy&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$origTable = clone $this-&amp;gt;getTable();&lt;br /&gt;
			$origTable-&amp;gt;load($input-&amp;gt;getInt(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
			if ($data[&#039;greeting&#039;] == $origTable-&amp;gt;greeting)&lt;br /&gt;
			{&lt;br /&gt;
				list($greeting, $alias) = $this-&amp;gt;generateNewTitle($data[&#039;catid&#039;], $data[&#039;alias&#039;], $data[&#039;greeting&#039;]);&lt;br /&gt;
				$data[&#039;greeting&#039;] = $greeting;&lt;br /&gt;
				$data[&#039;alias&#039;] = $alias;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				if ($data[&#039;alias&#039;] == $origTable-&amp;gt;alias)&lt;br /&gt;
				{&lt;br /&gt;
					$data[&#039;alias&#039;] = &#039;&#039;;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			// standard Joomla practice is to set the new record as unpublished&lt;br /&gt;
			$data[&#039;published&#039;] = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$result = parent::save($data);&lt;br /&gt;
		if ($result)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;getTable()-&amp;gt;rebuild(1);&lt;br /&gt;
		}&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to check if it&#039;s OK to delete a message. Overrides JModelAdmin::canDelete&lt;br /&gt;
	 */&lt;br /&gt;
	protected function canDelete($record)&lt;br /&gt;
	{&lt;br /&gt;
		if( !empty( $record-&amp;gt;id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.delete&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $record-&amp;gt;id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare a helloworld record for saving in the database&lt;br /&gt;
	 */&lt;br /&gt;
	protected function prepareTable($table)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Save the record reordering after a record is dragged to a new position in the helloworlds view&lt;br /&gt;
	 */&lt;br /&gt;
	public function saveorder($idArray = null, $lft_array = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get an instance of the table object.&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
&lt;br /&gt;
		if (!$table-&amp;gt;saveorder($idArray, $lft_array))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;setError($table-&amp;gt;getError());&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/tables/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;17,61-99,170-173&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTableNested&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   JDatabaseDriver  &amp;amp;$db  A database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db)&lt;br /&gt;
	{&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (isset($array[&#039;imageinfo&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;imageinfo&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the imageinfo array to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;imageinfo&#039;]);&lt;br /&gt;
			$array[&#039;image&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Bind the rules.&lt;br /&gt;
		if (isset($array[&#039;rules&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;rules&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$rules = new JAccessRules($array[&#039;rules&#039;]);&lt;br /&gt;
			$this-&amp;gt;setRules($rules);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (isset($array[&#039;parent_id&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			if (!isset($array[&#039;id&#039;]) || $array[&#039;id&#039;] == 0)&lt;br /&gt;
			{   // new record&lt;br /&gt;
				$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
			}&lt;br /&gt;
			elseif (isset($array[&#039;helloworldordering&#039;]))&lt;br /&gt;
			{&lt;br /&gt;
				// when saving a record load() is called before bind() so the table instance will have properties which are the existing field values&lt;br /&gt;
				if ($this-&amp;gt;parent_id == $array[&#039;parent_id&#039;])&lt;br /&gt;
				{&lt;br /&gt;
					// If first is chosen make the item the first child of the selected parent.&lt;br /&gt;
					if ($array[&#039;helloworldordering&#039;] == -1)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;first-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// If last is chosen make it the last child of the selected parent.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] == -2)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Don&#039;t try to put an item after itself. All other ones put after the selected item.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id != $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;helloworldordering&#039;], &#039;after&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Just leave it where it is if no change is made.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id == $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						unset($array[&#039;helloworldordering&#039;]);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				// Set the new parent id if parent id not matched and put in last position&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.helloworld.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the asset-parent-id of the item&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId(JTable $table = NULL, $id = NULL)&lt;br /&gt;
	{&lt;br /&gt;
		// We will retrieve the parent-asset from the Asset-table&lt;br /&gt;
		$assetParent = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		// Default: if no asset-parent can be found we take the global asset&lt;br /&gt;
		$assetParentId = $assetParent-&amp;gt;getRootId();&lt;br /&gt;
&lt;br /&gt;
		// Find the parent-asset&lt;br /&gt;
		if (($this-&amp;gt;catid)&amp;amp;&amp;amp; !empty($this-&amp;gt;catid))&lt;br /&gt;
		{&lt;br /&gt;
			// The item has a category as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld.category.&#039; . (int) $this-&amp;gt;catid);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// The item has the component as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Return the found asset-parent-id&lt;br /&gt;
		if ($assetParent-&amp;gt;id)&lt;br /&gt;
		{&lt;br /&gt;
			$assetParentId=$assetParent-&amp;gt;id;&lt;br /&gt;
		}&lt;br /&gt;
		return $assetParentId;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function check()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;alias = trim($this-&amp;gt;alias);&lt;br /&gt;
		if (empty($this-&amp;gt;alias))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;alias = $this-&amp;gt;greeting;&lt;br /&gt;
		}&lt;br /&gt;
		$this-&amp;gt;alias = JFilterOutput::stringURLSafe($this-&amp;gt;alias);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function delete($pk = null, $children = false)&lt;br /&gt;
	{&lt;br /&gt;
		return parent::delete($pk, $children);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Front-end Helloworld Display == &amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:105--&amp;gt; To display the parent and children on the helloworld page there are 3 changes required:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
# In the view, get the data for the parent and for the children using function calls to the model&lt;br /&gt;
# In the model provide the data for these function calls&lt;br /&gt;
# In the layout output the html which includes the parent and children data.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:107--&amp;gt; Note that we&#039;ve changed the model code to allow a parameter to &amp;lt;tt&amp;gt;getItem()&amp;lt;/tt&amp;gt;. This has the side-effect of changing the &amp;lt;tt&amp;gt;this-&amp;gt;item&amp;lt;/tt&amp;gt; variable within the model instance to point to the latest item retrieved. As the functionality within &amp;lt;tt&amp;gt;getMapParams()&amp;lt;/tt&amp;gt; (called from &amp;lt;tt&amp;gt;addMap()&amp;lt;/tt&amp;gt;) uses &amp;lt;tt&amp;gt;this-&amp;gt;item&amp;lt;/tt&amp;gt; to get the latitude and longitude etc for the current record, we need to ensure that the call to &amp;lt;tt&amp;gt;addMap()&amp;lt;/tt&amp;gt; happens before the new code we&#039;re introducing.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:108--&amp;gt; &#039;&#039;&#039;Note.&#039;&#039;&#039; If you had a menuitem pointing to your helloworld record which had id=1 then you&#039;ll need to edit that menuitem to point to the new id.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;42-46&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;addMap();&lt;br /&gt;
&lt;br /&gt;
		$model = $this-&amp;gt;getModel();&lt;br /&gt;
		$this-&amp;gt;parentItem = $model-&amp;gt;getItem($this-&amp;gt;item-&amp;gt;parent_id);&lt;br /&gt;
		$this-&amp;gt;children = $model-&amp;gt;getChildren($this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
		// getChildren includes the record itself (as well as the children) so remove this record&lt;br /&gt;
		unset($this-&amp;gt;children[0]);&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function addMap() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
&lt;br /&gt;
		// everything&#039;s dependent upon JQuery&lt;br /&gt;
		JHtml::_(&#039;jquery.framework&#039;);&lt;br /&gt;
&lt;br /&gt;
		// we need the Openlayers JS and CSS libraries&lt;br /&gt;
		$document-&amp;gt;addScript(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// ... and our own JS and CSS&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;media/com_helloworld/js/openstreetmap.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(JURI::root() . &amp;quot;media/com_helloworld/css/openstreetmap.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// get the data to pass to our JS code&lt;br /&gt;
		$params = $this-&amp;gt;get(&amp;quot;mapParams&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addScriptOptions(&#039;params&#039;, $params);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;71,73,75,78-79,184-189&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
JLoader::register(&#039;HelloworldHelperRoute&#039;, JPATH_ROOT . &#039;/components/com_helloworld/helpers/route.php&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var object item&lt;br /&gt;
	 */&lt;br /&gt;
	protected $item;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to auto-populate the model state.&lt;br /&gt;
	 *&lt;br /&gt;
	 * This method should only be called once per instantiation and is designed&lt;br /&gt;
	 * to be called on the first call to the getState() method unless the model&lt;br /&gt;
	 * configuration flag to ignore the request is set.&lt;br /&gt;
	 *&lt;br /&gt;
	 * Note. Calling getState in this method will result in recursion.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	void&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function populateState()&lt;br /&gt;
	{&lt;br /&gt;
		// Get the message id&lt;br /&gt;
		$jinput = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
		$id     = $jinput-&amp;gt;get(&#039;id&#039;, 1, &#039;INT&#039;);&lt;br /&gt;
		$this-&amp;gt;setState(&#039;message.id&#039;, $id);&lt;br /&gt;
&lt;br /&gt;
		// Load the parameters.&lt;br /&gt;
		$this-&amp;gt;setState(&#039;params&#039;, JFactory::getApplication()-&amp;gt;getParams());&lt;br /&gt;
		parent::populateState();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
	 * @return object The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($id = null)&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;item) || !is_null($id)) &lt;br /&gt;
		{&lt;br /&gt;
			$id    = is_null($id) ? $this-&amp;gt;getState(&#039;message.id&#039;) : $id;&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.greeting, h.params, h.image as image, c.title as category, h.latitude as latitude, h.longitude as longitude,&lt;br /&gt;
						h.id as id, h.alias as alias, h.catid as catid, h.parent_id as parent_id, h.level as level&#039;)&lt;br /&gt;
				  -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
				  -&amp;gt;leftJoin(&#039;#__categories as c ON h.catid=c.id&#039;)&lt;br /&gt;
				  -&amp;gt;where(&#039;h.id=&#039; . (int)$id);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery((string)$query);&lt;br /&gt;
		&lt;br /&gt;
			if ($this-&amp;gt;item = $db-&amp;gt;loadObject()) &lt;br /&gt;
			{&lt;br /&gt;
				// Load the JSON string&lt;br /&gt;
				$params = new JRegistry;&lt;br /&gt;
				$params-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;params, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Merge global params with item params&lt;br /&gt;
				$params = clone $this-&amp;gt;getState(&#039;params&#039;);&lt;br /&gt;
				$params-&amp;gt;merge($this-&amp;gt;item-&amp;gt;params);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Convert the JSON-encoded image info into an array&lt;br /&gt;
				$image = new JRegistry;&lt;br /&gt;
				$image-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;image, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;imageDetails = $image;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				throw new Exception(&#039;Helloworld id not found&#039;, 404);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;item;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapParams()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;item) &lt;br /&gt;
		{&lt;br /&gt;
			$url = HelloworldHelperRoute::getAjaxURL();&lt;br /&gt;
			$this-&amp;gt;mapParams = array(&lt;br /&gt;
				&#039;latitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;latitude,&lt;br /&gt;
				&#039;longitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;longitude,&lt;br /&gt;
				&#039;zoom&#039; =&amp;gt; 10,&lt;br /&gt;
				&#039;greeting&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;greeting,&lt;br /&gt;
				&#039;ajaxurl&#039; =&amp;gt; $url&lt;br /&gt;
			);&lt;br /&gt;
			return $this-&amp;gt;mapParams; &lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(&#039;No helloworld details available for map&#039;, 500);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapSearchResults($mapbounds)&lt;br /&gt;
	{&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.id, h.alias, h.catid, h.greeting, h.latitude, h.longitude&#039;)&lt;br /&gt;
			   -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
			   -&amp;gt;where(&#039;h.latitude &amp;gt; &#039; . $mapbounds[&#039;minlat&#039;] . &lt;br /&gt;
				&#039; AND h.latitude &amp;lt; &#039; . $mapbounds[&#039;maxlat&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;gt; &#039; . $mapbounds[&#039;minlng&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;lt; &#039; . $mapbounds[&#039;maxlng&#039;]);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$results = $db-&amp;gt;loadObjectList(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			$msg = $e-&amp;gt;getMessage();&lt;br /&gt;
			JFactory::getApplication()-&amp;gt;enqueueMessage($msg, &#039;error&#039;); &lt;br /&gt;
			$results = null;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		for ($i = 0; $i &amp;lt; count($results); $i++) &lt;br /&gt;
		{&lt;br /&gt;
			$results[$i]-&amp;gt;url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $results[$i]-&amp;gt;id . &lt;br /&gt;
				&amp;quot;:&amp;quot; . $results[$i]-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $results[$i]-&amp;gt;catid . $query_lang);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $results; &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getChildren($id)&lt;br /&gt;
	{&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
		$children = $table-&amp;gt;getTree($id);&lt;br /&gt;
		return $children;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;12-20,38-59&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;item-&amp;gt;greeting.(($this-&amp;gt;item-&amp;gt;category and $this-&amp;gt;item-&amp;gt;params-&amp;gt;get(&#039;show_category&#039;))&lt;br /&gt;
                                      ? (&#039; (&#039;.$this-&amp;gt;item-&amp;gt;category.&#039;)&#039;) : &#039;&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    $src = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;image&#039;];&lt;br /&gt;
    if ($src)&lt;br /&gt;
    {&lt;br /&gt;
        $html = &#039;&amp;lt;figure&amp;gt;&lt;br /&gt;
                    &amp;lt;img src=&amp;quot;%s&amp;quot; alt=&amp;quot;%s&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;figcaption&amp;gt;%s&amp;lt;/figcaption&amp;gt;&lt;br /&gt;
                &amp;lt;/figure&amp;gt;&#039;;&lt;br /&gt;
        $alt = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;alt&#039;];&lt;br /&gt;
        $caption = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;caption&#039;];&lt;br /&gt;
        echo sprintf($html, $src, $alt, $caption);&lt;br /&gt;
    } ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;parentItem-&amp;gt;id &amp;gt; 1) : ?&amp;gt;&lt;br /&gt;
	&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_PARENT&#039;) ?&amp;gt;&lt;br /&gt;
	&amp;lt;/h1&amp;gt;&lt;br /&gt;
	&amp;lt;h3&amp;gt;&lt;br /&gt;
		&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $this-&amp;gt;parentItem-&amp;gt;id . &#039;:&#039; . $this-&amp;gt;parentItem-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $this-&amp;gt;parentItem-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
		&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;parentItem-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
	&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;children) : &lt;br /&gt;
		$baseLevel = $this-&amp;gt;item-&amp;gt;level; ?&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_CHILDREN&#039;) ?&amp;gt;&lt;br /&gt;
		&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;lt;?php foreach ($this-&amp;gt;children as $i =&amp;gt; $child) : ?&amp;gt;&lt;br /&gt;
			&amp;lt;h3&amp;gt;&lt;br /&gt;
				&amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $child-&amp;gt;level - $baseLevel)); ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $child-&amp;gt;id . &#039;:&#039; . $child-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $child-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
				&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $child-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;/h3&amp;gt;&lt;br /&gt;
	&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;map&amp;quot; class=&amp;quot;map&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;map-callout map-callout-bottom&amp;quot; id=&amp;quot;greeting-container&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;searchmap&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo &#039;&amp;lt;input id=&amp;quot;token&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;&#039; . JSession::getFormToken() . &#039;&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;&#039;; ?&amp;gt;&lt;br /&gt;
    &amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;searchHere();&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_SEARCH_HERE_BUTTON&#039;) ?&amp;gt;&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;searchresults&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Helloworld Frontend Form == &amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:110--&amp;gt; To support capturing the parent in the frontend form we reuse the admin custom form field in the add-form xml definition.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:111--&amp;gt; Note that in the functionality for creating a new helloworld record on the frontend we haven&#039;t included a table &amp;lt;tt&amp;gt;rebuild()&amp;lt;/tt&amp;gt; so new records fail to get the &amp;lt;tt&amp;gt;path&amp;lt;/tt&amp;gt; field written in the database. However the new record will get inserted into the tree correctly because the front end uses the admin backend table code, and so it will pick up the inheritance of the Nested Table, with its &amp;lt;tt&amp;gt;bind()&amp;lt;/tt&amp;gt; override etc. This means too that we should remove the code in the model &amp;lt;tt&amp;gt;prepareTable()&amp;lt;/tt&amp;gt; which previously defined the ordering of the new record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;4,113-120&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    addfieldpath=&amp;quot;/administrator/components/com_helloworld/models/fields&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;fields name=&amp;quot;imageinfo&amp;quot; label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_IMAGE_LABEL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;image&amp;quot;&lt;br /&gt;
				type=&amp;quot;file&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_PICTURE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_PICTURE_DESC&amp;quot; &lt;br /&gt;
				accept=&amp;quot;image/*&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
 				name=&amp;quot;caption&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_CAPTION_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;alt&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_ALTTEXT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_ALTTEXT_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fields&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;language&amp;quot;&lt;br /&gt;
				type=&amp;quot;contentlanguage&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;message&amp;quot;&lt;br /&gt;
				type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
				rows=&amp;quot;5&amp;quot;&lt;br /&gt;
				cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
				validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/form.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/form.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;104-105&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelForm extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.form&#039;,&lt;br /&gt;
			&#039;add-form&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 * As this form is for add, we&#039;re not prefilling the form with an existing record&lt;br /&gt;
	 * But if the user has previously hit submit and the validation has found an error,&lt;br /&gt;
	 *   then we inject what was previously entered.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 * This returns the script associated with helloworld field greeting validation&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare a helloworld record for saving in the database&lt;br /&gt;
	 */&lt;br /&gt;
	protected function prepareTable($table)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Frontend Category View == &amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:113--&amp;gt; We just have to change the ordering to use the &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt; database field instead of the &amp;lt;tt&amp;gt;ordering&amp;lt;/tt&amp;gt; field.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/category.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/category.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;18,51&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Model for displaying the helloworld messages in a given category&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
class HelloworldModelCategory extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;alias&#039;,&lt;br /&gt;
				&#039;lft&#039;,&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	protected function populateState($ordering = null, $direction = null)&lt;br /&gt;
	{&lt;br /&gt;
		parent::populateState($ordering, $direction);&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
		$catid = $app-&amp;gt;input-&amp;gt;getInt(&#039;id&#039;);&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;setState(&#039;category.id&#039;, $catid);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$query-&amp;gt;select(&#039;id, greeting, alias, catid&#039;)&lt;br /&gt;
			-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;))&lt;br /&gt;
			-&amp;gt;where(&#039;catid = &#039; . $catid);&lt;br /&gt;
&lt;br /&gt;
		if (JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
			$query-&amp;gt;where(&#039;language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;lft&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;	&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getCategoryName()&lt;br /&gt;
	{&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$categories = JCategories::getInstance(&#039;Helloworld&#039;, array());&lt;br /&gt;
		$categoryNode = $categories-&amp;gt;get($catid);   &lt;br /&gt;
		return $categoryNode-&amp;gt;title; &lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	public function getSubcategories()&lt;br /&gt;
	{&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$categories = JCategories::getInstance(&#039;Helloworld&#039;, array());&lt;br /&gt;
		$categoryNode = $categories-&amp;gt;get($catid);&lt;br /&gt;
		$subcats = $categoryNode-&amp;gt;getChildren(); &lt;br /&gt;
        &lt;br /&gt;
		$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
		if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &#039;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		foreach ($subcats as $subcat)&lt;br /&gt;
		{&lt;br /&gt;
			$subcat-&amp;gt;url = JRoute::_(&amp;quot;index.php?view=category&amp;amp;id=&amp;quot; . $subcat-&amp;gt;id . $query_lang);&lt;br /&gt;
		}&lt;br /&gt;
		return $subcats;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/filter_category.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/filter_category.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;8,11-12&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;lft ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;COM_HELLOWORLD_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;alias ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ALIAS_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;alias DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ALIAS_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;10&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Updated Language Strings == &amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;25-26,37-38&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Any characters allowed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_IMAGE_LABEL=&amp;quot;Image information&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_PICTURE_LABEL=&amp;quot;Image file to upload&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_PICTURE_DESC=&amp;quot;Select the file with the image to upload&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CAPTION_DESC=&amp;quot;Text to use as a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALTTEXT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALTTEXT_DESC=&amp;quot;Text to display if image cannot be shown&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the record which is to be the parent&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
; file upload error conditions&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILEUPLOAD=&amp;quot;PHP Error %s encountered when uploading file&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILETOOLARGE=&amp;quot;Upload file exceeds max size configured in Joomla&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_BADFILENAME=&amp;quot;Upload file has an invalid filename&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILE_EXISTS=&amp;quot;Upload file already exists&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_UNABLE_TO_UPLOAD_FILE=&amp;quot;Error creating uploaded file&amp;quot;&lt;br /&gt;
; helloworld greeting page&lt;br /&gt;
COM_HELLOWORLD_PARENT=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CHILDREN=&amp;quot;Children&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SEARCH_HERE_BUTTON=&amp;quot;Search here&amp;quot;&lt;br /&gt;
; Ajax handling errors&lt;br /&gt;
COM_HELLOWORLD_ERROR_NO_RECORDS=&amp;quot;Didn&#039;t get any records&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_NO_MAP_BOUNDS=&amp;quot;Error: no map bounds&amp;quot;&lt;br /&gt;
; category view, search and ordering fields and headings&lt;br /&gt;
COM_HELLOWORLD_SORT_BY=&amp;quot;Sort by ...&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID_ASC=&amp;quot;id asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID_DESC=&amp;quot;id desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ALIAS_ASC=&amp;quot;alias asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ALIAS_DESC=&amp;quot;alias desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALIAS_LABEL=&amp;quot;Alias&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_URL_LABEL=&amp;quot;URL&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HEADER_SUBCATEGORIES=&amp;quot;Subcategories&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;34-38&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE=&amp;quot;Language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_POSITION=&amp;quot;Position&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL=&amp;quot;Latitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC=&amp;quot;Enter the position latitude, between -90 and +90 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL=&amp;quot;Longitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC=&amp;quot;Enter the position longitude, between -180 and +180 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the parent record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_FIRST=&amp;quot;-- First record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_LAST=&amp;quot;-- Last record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_TEXT=&amp;quot;Ordering will be available after saving.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC=&amp;quot;Select the appropriate language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_IMAGE_FIELDS=&amp;quot;Image details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL=&amp;quot;Select image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC=&amp;quot;Select an image from the library, or upload a new one&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC=&amp;quot;Alternative text (if image cannot be displayed)&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC=&amp;quot;Provide a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_ASSOCIATIONS=&amp;quot;Message Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_IMAGE=&amp;quot;Image info&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_ASC=&amp;quot;Language ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_DESC=&amp;quot;Language descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_ASC=&amp;quot;Association ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_DESC=&amp;quot;Association descending&amp;quot;&lt;br /&gt;
; Helloworld menuitem - selecting a greeting via modal&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_MODAL_TITLE=&amp;quot;Select greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD=&amp;quot;Select&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_BUTTON_TOOLTIP=&amp;quot;Select a helloworld greeting&amp;quot;&lt;br /&gt;
; Checking in records&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_0=&amp;quot;No records checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_1=&amp;quot;%d record successfully checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_MORE=&amp;quot;%d records successfully checked in.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the Component == &amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:116--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/router.php|site/router.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/view.json.php|site/views/helloworld/view.json.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/view.html.php|site/views/category/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/tmpl/default.php|site/views/category/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#site/views/category/tmpl/default.xml|site/views/category/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/category.php|site/models/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/filter_category.xml|site/models/forms/filter_category.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Levels#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/route.php|site/helpers/route.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/category.php|site/helpers/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/helpers/association.php|site/helpers/association.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/associations.php|admin/helpers/associations.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/html/helloworlds.php|admin/helpers/html/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/html/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/sql/updates/mysql/0.0.17.sql|admin/sql/updates/mysql/0.0.17.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#admin/sql/updates/mysql/0.0.18.sql|admin/sql/updates/mysql/0.0.18.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/sql/updates/mysql/0.0.20.sql|admin/sql/updates/mysql/0.0.20.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/updates/mysql/0.0.21.sql|admin/sql/updates/mysql/0.0.21.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Checkout#admin/sql/updates/mysql/0.0.24.sql|admin/sql/updates/mysql/0.0.24.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Ordering#admin/sql/updates/mysql/0.0.25.sql|admin/sql/updates/mysql/0.0.25.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/updates/mysql/0.0.26.sql|admin/sql/updates/mysql/0.0.26.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldordering.php|admin/models/fields/helloworldordering.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldparent.php|admin/models/fields/helloworldparent.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/modal/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/models/fields/modal/helloworld.php|admin/models/fields/modal/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworlds/tmpl/modal.php|admin/views/helloworlds/tmpl/modal.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Levels#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/js/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#media/js/openstreetmap.js|media/js/openstreetmap.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#media/js/admin-helloworlds-modal.js|media/js/admin-helloworlds-modal.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/css/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#index.html|media/css/openstreetmap.css]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.26&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;router.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;js&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;css&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Ordering|&amp;lt;translate&amp;gt;&amp;lt;!--T:118--&amp;gt; Prev: Adding Ordering&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Versioning|&amp;lt;translate&amp;gt;&amp;lt;!--T:119--&amp;gt; Next: Adding Versioning&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Access&amp;diff=650683</id>
		<title>J3.x:Developing an MVC Component/Adding Access</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Access&amp;diff=650683"/>
		<updated>2020-03-20T17:37:04Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: published column added since https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_Levels as we can&amp;#039;t publish items without having our helloworld root record published.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:2--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; In this step we add access capability to our component, which allows us to restrict the set of users who can view our helloworld data. This step really fits before [[S:MyLanguage/J3.x:Developing an MVC Component/Adding ACL|Adding ACL]], but is added belatedly for completeness here.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; There is a video accompanying this step (which was originally produced at the same time as the other videos for ACL) available at [https://youtu.be/CS_Ok1t550E Access Levels].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=CS_Ok1t550E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; If you&#039;re not familiar with Access within Joomla, then it&#039;s worthwhile playing around with the functionality – setting access on menuitems and articles, setting the accesslevels of user groups (and hence of users), and confirming that users can see only the items to which they have been granted access. This works on both the site front end, and the admin back end.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The diagram shows how Joomla user access levels work.&amp;lt;/translate&amp;gt; &lt;br /&gt;
[[File:joomla-access-levels.jpg|right|Joomla Access Levels]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; Each item – eg an article, a menuitem, or in our case a helloworld record – has an access level assigned.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; Each user is assigned one or more user groups, and user groups have a hierarchical (tree) structure, so that if a user belongs to a user group which is a child of another, then that user is also a member of the parent user group.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Each access level has one more associated user groups, who will then have view access to items which have that access level.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
When the user requests to view a particular item, then the functionality &lt;br /&gt;
# obtains the set of accesslevels that the user has&lt;br /&gt;
# checks if the accesslevel of the requested item is within the set of accesslevels of that user&lt;br /&gt;
# if it is, then the item is presented to the user&lt;br /&gt;
# if it isn&#039;t, then an HTTP response with status 403 (forbidden) is returned.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Database Changes === &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; To enable us to have an Access Level against a helloworld record, we need to specify a new field in the database, which we&#039;ll call &amp;quot;access&amp;quot;. We&#039;ll set the database default value of this access field to be 0, however in the &amp;lt;tt&amp;gt;JTable&amp;lt;/tt&amp;gt; constructor there is code which looks for a database field called &amp;quot;access&amp;quot; and if it finds it then it sets the default value of the &amp;lt;tt&amp;gt;access&amp;lt;/tt&amp;gt; property in the &amp;lt;tt&amp;gt;JTable&amp;lt;/tt&amp;gt; object to have the value specified in the global config (in configuration.php). So we use this mechanism to align with what an administrator would want to have as the default access across the Joomla website.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:69--&amp;gt; However, for those helloworld records already present in the database, we don&#039;t want to have the access field set to 0 (the SQL default), so after altering the table to introduce the new access field we must update those records. Ideally we should use an install script and perform a SQL UPDATE to set &amp;lt;tt&amp;gt;access&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;JFactory::getConfig()-&amp;gt;get(&#039;access&#039;)&amp;lt;/tt&amp;gt;, but for simplicity we just use a SQL UPDATE statement to set it to 1 (ie public access).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; We also have a change to our content_types field mapping, as described below.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Admin back end changes === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; To enable the administrator to set this field, we will add an Access field within the back-end edit form, and we use the &amp;quot;[[S:MyLanguage/Accesslevel form field type|accesslevel]]&amp;quot; field type within the Joomla [[S:MyLanguage/Standard form field types|standard form field types]]. As is often the case, this field will get automatically saved to the &amp;quot;access&amp;quot; field in the database by our existing code.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; On our administrator helloworlds view we&#039;ll add a column to display the Access Level assigned to that item. As this should be displayed as a string rather than the int value in the helloworld record, we have to do a SQL JOIN find the associated title of the access level from where they&#039;re stored in the viewlevels record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; We will make this column sortable, so we must include options for it in the filter fields xml file and in the helloworlds model.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt; We also want to restrict the administrator to only those helloworld records that he/she has access to view, so this will involve a filter within the SQL query in our model.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; The key Joomla method which we use to find the accesslevels which a user has is &amp;lt;tt&amp;gt;JUser::getAuthorisedViewLevels()&amp;lt;/tt&amp;gt;, and for a user to be allowed to view an item, the item&#039;s accesslevel must be within the array of accesslevels returned by &amp;lt;tt&amp;gt;getAuthorisedViewLevels()&amp;lt;/tt&amp;gt;. This is true for both front end and back end.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; We will also follow the pattern in Joomla, which specifies that to view an item the user must have access to both the item itself and to the category (if any) associated with the item. Joomla already allows us to set an accesslevel against a category, and where categories are being displayed (both on front end and back end) it filters them to show only those which the user is entitled to see. However, we must write the code in the case where we&#039;re displaying helloworld records, to check that the user is entitled to view the associated category as well.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Frontend changes === &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt; On the front end we have pages where we display a single helloworld record (our Hello World menuitem) and others where we display a list of records (Category view, our Ajax response to the Search here on the map, and functionality developed in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding Levels|Adding Levels]] to output a list of children of a helloworld record). What if the visitor to the site doesn&#039;t have access to view a record? In this case we could return an error 403 (forbidden) for a single record, and avoid including an inaccessible record in a list.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; However, the user may actually have access to the record and the problem is that he/she just hasn&#039;t logged in yet. So we&#039;ll make it a bit more sophisticated, and check if the user is currently logged in, and adopt the following approach (which reflects the various strategies you might consider for an actual component):&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; If the user is logged in then&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
* for the Hello World menuitem, if the user doesn&#039;t have access then we&#039;ll provide an HTTP status 403 (forbidden) and an error message.&lt;br /&gt;
* for the Category list and Ajax list, if a record can&#039;t be accessed then we&#039;ll omit it from the list.&lt;br /&gt;
* for the list of children, we&#039;ll just output all the records anyway.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; If the user isn&#039;t logged in then&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
* for the Hello World menuitem, if the user doesn&#039;t have access then we&#039;ll provide a notice and a redirect to the login form.&lt;br /&gt;
* for the Category list, if a record can&#039;t be accessed we&#039;ll still include it in the list, but add a message to the record prompting the user to login.&lt;br /&gt;
* for the Ajax list we&#039;ll just display the record&#039;s link as normal – when the user clicks on it then the action above for the Hello World menuitem will be taken. &lt;br /&gt;
* for the list of children, we&#039;ll just output all the records anyway.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; To find if the user is logged in we use &amp;lt;tt&amp;gt;JFactory::getUser()-&amp;gt;get(&#039;guest&#039;)&amp;lt;/tt&amp;gt; which returns 1 if just a guest on the site, ie not logged in, and returns 0 if the user is logged in.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; The split of functionality we&#039;ll adopt is:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
Hello World menuitem: &lt;br /&gt;
* Model: determine if the user has access to the record&lt;br /&gt;
* View: if the user doesn&#039;t have access then display an error (with a redirect to login) or a notice (with a redirect to login) depending upon whether the user is logged in or not.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; Category list:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
* Model: we&#039;ll post-process the items returned from the query, and for those where the user doesn&#039;t have access we&#039;ll remove them if the user is logged in, or set a &amp;quot;no-access&amp;quot; flag if the user isn&#039;t logged in&lt;br /&gt;
* Layout: we&#039;ll display the record differently if the no-access flag is set&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; Ajax list:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; * If the user is logged in, then we&#039;ll change the SQL query to omit records the user doesn&#039;t have access to, but continue to return all the records if the user isn&#039;t logged in.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; List of children:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; * no change - all the records will be returned regardless of whether the user has access or not.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; Finally, as helloworld records may be viewed (to a certain extent) via the tags functionality, we update our field mappings so that our access field is copied into the ucm_content table core_access field. This means that the same restrictions will apply to viewing both the helloworld record and its copy in the ucm_content table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; (If we didn&#039;t copy the field into ucm_content then Joomla&#039;s tag functionality would store the default of 0 in its core_access field. The JTable constructor doesn&#039;t set the global config access value here because the ucm_content field is called &amp;quot;core_access&amp;quot; rather than &amp;quot;access&amp;quot;. Whenever Joomla&#039;s com_tags component displays the records having a particular tag, it always includes records with a core_access of 0, and hence would show helloworld records which the user couldn&#039;t access, so that when the user clicked on them then the user would receive the &amp;quot;no access&amp;quot; notification).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt; In the previous step we needed to set a published field in the front end form to get the default value of 1 carried through to the ucm_content table. However, we don&#039;t need to do the same for the access field, because of the way the JTable constructor sets the default value into the JTable object.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Database == &amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; We add our new access field to the helloworld record, and include this in the set of fields which are mapped to the ucm_content copy.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.29.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/updates/mysql/0.0.29.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `access` tinyint(4) NOT NULL DEFAULT &#039;0&#039; AFTER `published`;&lt;br /&gt;
UPDATE `#__helloworld` SET `access` = 1; &lt;br /&gt;
&lt;br /&gt;
UPDATE `#__content_types` SET&lt;br /&gt;
`field_mappings` = &lt;br /&gt;
&#039;{&amp;quot;common&amp;quot;: {&lt;br /&gt;
	&amp;quot;core_content_item_id&amp;quot;: &amp;quot;id&amp;quot;,&lt;br /&gt;
	&amp;quot;core_title&amp;quot;: &amp;quot;greeting&amp;quot;,&lt;br /&gt;
	&amp;quot;core_state&amp;quot;: &amp;quot;published&amp;quot;,&lt;br /&gt;
	&amp;quot;core_alias&amp;quot;: &amp;quot;alias&amp;quot;,&lt;br /&gt;
	&amp;quot;core_language&amp;quot;:&amp;quot;language&amp;quot;, &lt;br /&gt;
	&amp;quot;core_created_time&amp;quot;: &amp;quot;created&amp;quot;,&lt;br /&gt;
	&amp;quot;core_body&amp;quot;: &amp;quot;description&amp;quot;,&lt;br /&gt;
	&amp;quot;core_access&amp;quot;: &amp;quot;access&amp;quot;,&lt;br /&gt;
	&amp;quot;core_catid&amp;quot;: &amp;quot;catid&amp;quot;&lt;br /&gt;
  }}&#039;&lt;br /&gt;
WHERE `type_alias` = &#039;com_helloworld.helloworld&#039;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;20,60&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out` INT(10) NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out_time` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`description` VARCHAR(4000) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`alias`  VARCHAR(40)  NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`language`  CHAR(7)  NOT NULL DEFAULT &#039;*&#039;,&lt;br /&gt;
	`parent_id`	int(10)    NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`level`	int(10)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`path`	VARCHAR(400)    NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`lft`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`rgt`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`access` tinyint(4) NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`image`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`latitude` DECIMAL(9,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	`longitude` DECIMAL(10,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
CREATE UNIQUE INDEX `aliasindex` ON `#__helloworld` (`alias`, `catid`);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`,`alias`,`language`, `parent_id`, `level`, `path`, `lft`, `rgt`, `published`) VALUES&lt;br /&gt;
(&#039;helloworld root&#039;,&#039;helloworld-root-alias&#039;,&#039;en-GB&#039;, 0, 0, &#039;&#039;, 0, 5, 1),&lt;br /&gt;
(&#039;Hello World!&#039;,&#039;hello-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;hello-world&#039;, 1, 2, 0),&lt;br /&gt;
(&#039;Goodbye World!&#039;,&#039;goodbye-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;goodbye-world&#039;, 3, 4, 0);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__content_types` (`type_title`, `type_alias`, `content_history_options`, `table`, `field_mappings`, `router`) &lt;br /&gt;
VALUES&lt;br /&gt;
(&#039;Helloworld&#039;, &#039;com_helloworld.helloworld&#039;, &lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_helloworld\\/models\\/forms\\/helloworld.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_by&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__helloworld&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;greeting&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;catid&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;,&lt;br /&gt;
&#039;{&amp;quot;special&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__helloworld&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Helloworld&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;HelloworldTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;},&lt;br /&gt;
&amp;quot;common&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__ucm_content&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;ucm_id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Corecontent&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;}}&#039;,&lt;br /&gt;
&#039;{&amp;quot;common&amp;quot;: {&lt;br /&gt;
	&amp;quot;core_content_item_id&amp;quot;: &amp;quot;id&amp;quot;,&lt;br /&gt;
	&amp;quot;core_title&amp;quot;: &amp;quot;greeting&amp;quot;,&lt;br /&gt;
	&amp;quot;core_state&amp;quot;: &amp;quot;published&amp;quot;,&lt;br /&gt;
	&amp;quot;core_alias&amp;quot;: &amp;quot;alias&amp;quot;,&lt;br /&gt;
	&amp;quot;core_language&amp;quot;:&amp;quot;language&amp;quot;, &lt;br /&gt;
	&amp;quot;core_created_time&amp;quot;: &amp;quot;created&amp;quot;,&lt;br /&gt;
	&amp;quot;core_body&amp;quot;: &amp;quot;description&amp;quot;,&lt;br /&gt;
	&amp;quot;core_access&amp;quot;: &amp;quot;access&amp;quot;,&lt;br /&gt;
	&amp;quot;core_catid&amp;quot;: &amp;quot;catid&amp;quot;&lt;br /&gt;
  }}&#039;,&lt;br /&gt;
&#039;HelloworldHelperRoute::getHelloworldRoute&#039;),&lt;br /&gt;
(&#039;Helloworld Category&#039;, &#039;com_helloworld.category&#039;,&lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;,&amp;quot;extension&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;modified_user_id&amp;quot;, &amp;quot;modified_time&amp;quot;, &amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;version&amp;quot;, &amp;quot;hits&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[&amp;quot;publish_up&amp;quot;, &amp;quot;publish_down&amp;quot;], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;access&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__viewlevels&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;modified_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;,&lt;br /&gt;
&#039;{&amp;quot;special&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Category&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;},&lt;br /&gt;
&amp;quot;common&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__ucm_content&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;ucm_id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Corecontent&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;}}&#039;,&lt;br /&gt;
&#039;{&amp;quot;common&amp;quot;: {&lt;br /&gt;
	&amp;quot;core_content_item_id&amp;quot;:&amp;quot;id&amp;quot;,&lt;br /&gt;
	&amp;quot;core_title&amp;quot;:&amp;quot;title&amp;quot;,&lt;br /&gt;
	&amp;quot;core_state&amp;quot;:&amp;quot;published&amp;quot;,&lt;br /&gt;
	&amp;quot;core_alias&amp;quot;:&amp;quot;alias&amp;quot;,&lt;br /&gt;
	&amp;quot;core_created_time&amp;quot;:&amp;quot;created_time&amp;quot;,&lt;br /&gt;
	&amp;quot;core_modified_time&amp;quot;:&amp;quot;modified_time&amp;quot;,&lt;br /&gt;
	&amp;quot;core_body&amp;quot;:&amp;quot;description&amp;quot;, &lt;br /&gt;
	&amp;quot;core_hits&amp;quot;:&amp;quot;hits&amp;quot;,&lt;br /&gt;
	&amp;quot;core_publish_up&amp;quot;:&amp;quot;null&amp;quot;,&lt;br /&gt;
	&amp;quot;core_publish_down&amp;quot;:&amp;quot;null&amp;quot;,&lt;br /&gt;
	&amp;quot;core_access&amp;quot;:&amp;quot;access&amp;quot;, &lt;br /&gt;
	&amp;quot;core_params&amp;quot;:&amp;quot;params&amp;quot;, &lt;br /&gt;
	&amp;quot;core_featured&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metadata&amp;quot;:&amp;quot;metadata&amp;quot;, &lt;br /&gt;
	&amp;quot;core_language&amp;quot;:&amp;quot;language&amp;quot;, &lt;br /&gt;
	&amp;quot;core_images&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_urls&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_version&amp;quot;:&amp;quot;version&amp;quot;,&lt;br /&gt;
	&amp;quot;core_ordering&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metakey&amp;quot;:&amp;quot;metakey&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metadesc&amp;quot;:&amp;quot;metadesc&amp;quot;, &lt;br /&gt;
	&amp;quot;core_catid&amp;quot;:&amp;quot;parent_id&amp;quot;, &lt;br /&gt;
	&amp;quot;core_xreference&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;asset_id&amp;quot;:&amp;quot;asset_id&amp;quot;}, &lt;br /&gt;
  &amp;quot;special&amp;quot;:{&lt;br /&gt;
    &amp;quot;parent_id&amp;quot;:&amp;quot;parent_id&amp;quot;,&lt;br /&gt;
	&amp;quot;lft&amp;quot;:&amp;quot;lft&amp;quot;,&lt;br /&gt;
	&amp;quot;rgt&amp;quot;:&amp;quot;rgt&amp;quot;,&lt;br /&gt;
	&amp;quot;level&amp;quot;:&amp;quot;level&amp;quot;,&lt;br /&gt;
	&amp;quot;path&amp;quot;:&amp;quot;path&amp;quot;,&lt;br /&gt;
	&amp;quot;extension&amp;quot;:&amp;quot;extension&amp;quot;,&lt;br /&gt;
	&amp;quot;note&amp;quot;:&amp;quot;note&amp;quot;}}&#039;,&lt;br /&gt;
&#039;HelloworldHelperRoute::getCategoryRoute&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Admin Edit Form == &amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; We add the access field into the form xml definition. That&#039;s all we need to do to enable the administrator to view and set that field, and to get it written to the database.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;96-102&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
				addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox validate-greeting&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;latitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-90.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;90.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;longitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-180.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;180.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field  &lt;br /&gt;
                name=&amp;quot;language&amp;quot; &lt;br /&gt;
        		type=&amp;quot;contentlanguage&amp;quot; &lt;br /&gt;
                label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;published&amp;quot; &lt;br /&gt;
				type=&amp;quot;list&amp;quot; &lt;br /&gt;
				label=&amp;quot;JSTATUS&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_PUBLISHED_DESC&amp;quot; &lt;br /&gt;
				class=&amp;quot;chzn-color-state&amp;quot;&lt;br /&gt;
				filter=&amp;quot;intval&amp;quot; 	&lt;br /&gt;
				size=&amp;quot;1&amp;quot; &lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
				JPUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
				JUNPUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;tags&amp;quot; &lt;br /&gt;
				type=&amp;quot;tag&amp;quot;&lt;br /&gt;
				label=&amp;quot;JTAG&amp;quot; &lt;br /&gt;
				description=&amp;quot;JTAG_DESC&amp;quot;&lt;br /&gt;
				multiple=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field  &lt;br /&gt;
				name=&amp;quot;access&amp;quot; &lt;br /&gt;
				type=&amp;quot;accesslevel&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ACCESS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ACCESS_DESC&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_ORDERING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ORDERING_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&lt;br /&gt;
				size=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;version_note&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELD_VERSION_NOTE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JGLOBAL_FIELD_VERSION_NOTE_DESC&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot; &lt;br /&gt;
				size=&amp;quot;45&amp;quot;&lt;br /&gt;
				labelclass=&amp;quot;control-label&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;description&amp;quot; &lt;br /&gt;
				type=&amp;quot;editor&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_LABEL&amp;quot; &lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;JComponentHelper::filterText&amp;quot; &lt;br /&gt;
				buttons=&amp;quot;true&amp;quot; &lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;imageinfo&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;image-info&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_IMAGE_FIELDS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
                name=&amp;quot;image&amp;quot;&lt;br /&gt;
                type=&amp;quot;media&amp;quot;&lt;br /&gt;
                preview=&amp;quot;tooltip&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;field name=&amp;quot;alt&amp;quot;&lt;br /&gt;
                type=&amp;quot;text&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC&amp;quot;&lt;br /&gt;
                size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;field name=&amp;quot;caption&amp;quot;&lt;br /&gt;
                type=&amp;quot;text&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC&amp;quot;&lt;br /&gt;
                size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;params&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELDSET_DISPLAY_OPTIONS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
					type=&amp;quot;list&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
					default=&amp;quot;&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_USE_GLOBAL&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;accesscontrol&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FIELDSET_RULES&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;asset_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				filter=&amp;quot;unset&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;rules&amp;quot;&lt;br /&gt;
				type=&amp;quot;rules&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_FIELD_RULES_LABEL&amp;quot;&lt;br /&gt;
				filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
				validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				section=&amp;quot;message&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Admin Helloworlds Display == &amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Updates to 3 files are required to implement the necessary changes:&lt;br /&gt;
# the layout file&lt;br /&gt;
# the filter fields xml definition&lt;br /&gt;
# the helloworlds model&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:48--&amp;gt; In the layout file we replace the 4 columns associated with the nested table structure (lft, rgt, level, parent) with the access column, and make it a sortable column.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;67-69,185-187&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
$user = JFactory::getUser();&lt;br /&gt;
$userId = $user-&amp;gt;get(&#039;id&#039;);&lt;br /&gt;
$saveOrder = ($listOrder == &#039;lft&#039; &amp;amp;&amp;amp; strtolower($listDirn) == &#039;asc&#039;);&lt;br /&gt;
if ($saveOrder)&lt;br /&gt;
{&lt;br /&gt;
        $saveOrderingUrl = &#039;index.php?option=com_helloworld&amp;amp;task=helloworlds.saveOrderAjax&amp;amp;tmpl=component&#039;;&lt;br /&gt;
        // pass true as parameter 7 to indicate that we have a nested set&lt;br /&gt;
        JHtml::_(&#039;sortablelist.sortable&#039;, &#039;helloworldList&#039;, &#039;adminForm&#039;, strtolower($listDirn), $saveOrderingUrl, false, true);&lt;br /&gt;
}&lt;br /&gt;
$assoc = JLanguageAssociations::isEnabled();&lt;br /&gt;
$authorFieldwidth = $assoc ? &amp;quot;10%&amp;quot; : &amp;quot;25%&amp;quot;;&lt;br /&gt;
JLoader::register(&#039;JHtmlHelloworlds&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_helloworld/helpers/html/helloworlds.php&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot; id=&amp;quot;helloworldList&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;&#039;, &#039;lft&#039;, $listDirn, $listOrder, null, &#039;asc&#039;, &#039;JGRID_HEADING_ORDERING&#039;, &#039;icon-menu-2&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_POSITION&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_IMAGE&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;20%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;,  &#039;JGRID_HEADING_ACCESS&#039;, &#039;access&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS&#039;, &#039;association&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;&amp;lt;?php echo $authorFieldwidth; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_LANGUAGE&#039;, &#039;language&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                        $row-&amp;gt;image = new Registry;&lt;br /&gt;
                        $row-&amp;gt;image-&amp;gt;loadString($row-&amp;gt;imageInfo);&lt;br /&gt;
                        // create a list of the parents up the hierarchy to the root &lt;br /&gt;
                        if ($row-&amp;gt;level &amp;gt; 1)&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                            $_currentParentId = $row-&amp;gt;parent_id;&lt;br /&gt;
                            $parentsStr = &#039; &#039; . $_currentParentId;&lt;br /&gt;
                            for ($j = 0; $j &amp;lt; $row-&amp;gt;level; $j++)&lt;br /&gt;
                            {&lt;br /&gt;
                                foreach ($this-&amp;gt;ordering as $k =&amp;gt; $v)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $v = implode(&#039;-&#039;, $v);&lt;br /&gt;
                                    $v = &#039;-&#039; . $v . &#039;-&#039;;&lt;br /&gt;
                                    if (strpos($v, &#039;-&#039; . $_currentParentId . &#039;-&#039;) !== false)&lt;br /&gt;
                                    {&lt;br /&gt;
                                        $parentsStr .= &#039; &#039; . $k;&lt;br /&gt;
                                        $_currentParentId = $k;&lt;br /&gt;
                                        break;&lt;br /&gt;
                                    }&lt;br /&gt;
                                }&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        else&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                        }&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr class=&amp;quot;row&amp;lt;?php echo $i % 2; ?&amp;gt;&amp;quot; sortable-group-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;parent_id; ?&amp;gt;&amp;quot; item-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&amp;quot; parents=&amp;quot;&amp;lt;?php echo $parentsStr; ?&amp;gt;&amp;quot; level=&amp;quot;&amp;lt;?php echo $row-&amp;gt;level; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php&lt;br /&gt;
                                $iconClass = &#039;&#039;;&lt;br /&gt;
                                $canReorder  = $user-&amp;gt;authorise(&#039;core.edit.state&#039;, &#039;com_helloworld.helloworld.&#039; . $row-&amp;gt;id);&lt;br /&gt;
                                if (!$canReorder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive&#039;;&lt;br /&gt;
                                }&lt;br /&gt;
                                elseif (!$saveOrder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive tip-top hasTooltip&amp;quot; title=&amp;quot;&#039; . JHtml::_(&#039;tooltipText&#039;, &#039;JORDERINGDISABLED&#039;);&lt;br /&gt;
                                }&lt;br /&gt;
                                ?&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;sortable-handler&amp;lt;?php echo $iconClass ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;span class=&amp;quot;icon-menu&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($canReorder &amp;amp;&amp;amp; $saveOrder) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;input type=&amp;quot;text&amp;quot; style=&amp;quot;display:none&amp;quot; name=&amp;quot;order[]&amp;quot; size=&amp;quot;5&amp;quot; value=&amp;quot;&amp;lt;?php echo $row-&amp;gt;lft; ?&amp;gt;&amp;quot; class=&amp;quot;width-20 text-area-order&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $row-&amp;gt;level)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($row-&amp;gt;checked_out) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php $canCheckin = $user-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_checkin&#039;) || $row-&amp;gt;checked_out == $userId; ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JHtml::_(&#039;jgrid.checkedout&#039;, $i, $row-&amp;gt;editor, $row-&amp;gt;checked_out_time, &#039;helloworlds.&#039;, $canCheckin); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;small break-word&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JText::sprintf(&#039;JGLOBAL_LIST_ALIAS&#039;, $this-&amp;gt;escape($row-&amp;gt;alias)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo &#039;Path: &#039; . $this-&amp;gt;escape($row-&amp;gt;path); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo &amp;quot;[&amp;quot; . $row-&amp;gt;latitude . &amp;quot;, &amp;quot; . $row-&amp;gt;longitude . &amp;quot;]&amp;quot;; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php&lt;br /&gt;
                                    $caption = $row-&amp;gt;image-&amp;gt;get(&#039;caption&#039;) ? : &#039;&#039; ;&lt;br /&gt;
                                    $src = JURI::root() . ($row-&amp;gt;image-&amp;gt;get(&#039;image&#039;) ? : &#039;&#039; );&lt;br /&gt;
                                    $html = &#039;&amp;lt;p class=&amp;quot;hasTooltip&amp;quot; style=&amp;quot;display: inline-block&amp;quot; data-html=&amp;quot;true&amp;quot; data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;&amp;lt;img width=\&#039;100px\&#039; height=\&#039;100px\&#039; src=\&#039;%s\&#039;&amp;gt;&amp;quot;&amp;gt;%s&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
                                    echo sprintf($html, $src, $caption);  ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $this-&amp;gt;escape($row-&amp;gt;access_level); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                                &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php if ($row-&amp;gt;association) : ?&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JHtml::_(&#039;helloworlds.association&#039;, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JLayoutHelper::render(&#039;joomla.content.language&#039;, $row); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; Secondly, in the filter helloworlds form definition we add the 2 options for sorting by the access column.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;65-66&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;language&amp;quot;&lt;br /&gt;
			type=&amp;quot;contentlanguage&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_FILTER_LANGUAGE&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_FILTER_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_LANGUAGE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;category_id&amp;quot;&lt;br /&gt;
			type=&amp;quot;category&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_FILTER_CATEGORY&amp;quot;&lt;br /&gt;
			extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			published=&amp;quot;0,1,2&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;greeting ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;ordering ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;ordering DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;language ASC&amp;quot;&amp;gt;COM_HELLOWORLD_LANGUAGE_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;language DESC&amp;quot;&amp;gt;COM_HELLOWORLD_LANGUAGE_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;access ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ACCESS_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;access DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ACCESS_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;association ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ASSOCIATION_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;association DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ASSOCIATION_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt; Thirdly we must change the helloworlds model&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; * to include the access field in the query, and translate the access value into the name of that access level,&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; * to include the access field within the list of sort fields (&amp;lt;tt&amp;gt;$config&amp;lt;/tt&amp;gt; array),&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; * to restrict the record returned to those which the user has access to see, by adding an additional SQL WHERE clause.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; Note that we must check specifically for the user being a Super User (&amp;lt;tt&amp;gt;$user-&amp;gt;authorise(&#039;core.admin&#039;)&amp;lt;/tt&amp;gt; returns &amp;lt;tt&amp;gt;true&amp;lt;/tt&amp;gt;), as they should be able to see everything, regardless of access.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;39,84,87,120-122,159-165&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
        /**&lt;br /&gt;
         * Constructor.&lt;br /&gt;
         *&lt;br /&gt;
         * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
         *&lt;br /&gt;
         * @see     JController&lt;br /&gt;
         * @since   1.6&lt;br /&gt;
         */&lt;br /&gt;
        public function __construct($config = array())&lt;br /&gt;
        {&lt;br /&gt;
                if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
                {&lt;br /&gt;
                        $config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
                                &#039;id&#039;,&lt;br /&gt;
                                &#039;greeting&#039;,&lt;br /&gt;
                                &#039;author&#039;,&lt;br /&gt;
                                &#039;created&#039;,&lt;br /&gt;
                                &#039;language&#039;,&lt;br /&gt;
                                &#039;lft&#039;,&lt;br /&gt;
                                &#039;category_id&#039;,&lt;br /&gt;
                                &#039;access&#039;,&lt;br /&gt;
                                &#039;association&#039;,&lt;br /&gt;
                                &#039;published&#039;&lt;br /&gt;
                        );&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($config);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        protected function populateState($ordering = &#039;lft&#039;, $direction = &#039;asc&#039;)&lt;br /&gt;
        {&lt;br /&gt;
                $app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
                // Adjust the context to support modal layouts.&lt;br /&gt;
                if ($layout = $app-&amp;gt;input-&amp;gt;get(&#039;layout&#039;))&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;context .= &#039;.&#039; . $layout;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Adjust the context to support forced languages.&lt;br /&gt;
                $forcedLanguage = $app-&amp;gt;input-&amp;gt;get(&#039;forcedLanguage&#039;, &#039;&#039;, &#039;CMD&#039;);&lt;br /&gt;
                if ($forcedLanguage)&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;context .= &#039;.&#039; . $forcedLanguage;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                parent::populateState($ordering, $direction);&lt;br /&gt;
        &lt;br /&gt;
                // If there&#039;s a forced language then define that filter for the query where clause&lt;br /&gt;
                if (!empty($forcedLanguage))&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;setState(&#039;filter.language&#039;, $forcedLanguage);&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /**&lt;br /&gt;
         * Method to build an SQL query to load the list data.&lt;br /&gt;
         *&lt;br /&gt;
         * @return      string  An SQL query&lt;br /&gt;
         */&lt;br /&gt;
        protected function getListQuery()&lt;br /&gt;
        {&lt;br /&gt;
                // Initialize variables.&lt;br /&gt;
                $db    = JFactory::getDbo();&lt;br /&gt;
                $query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
                $user = JFactory::getUser();&lt;br /&gt;
&lt;br /&gt;
                // Create the base select statement.&lt;br /&gt;
                $query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created, a.access as access,&lt;br /&gt;
                          a.checked_out as checked_out, a.checked_out_time as checked_out_time, a.catid as catid,&lt;br /&gt;
                          a.lft as lft, a.rgt as rgt, a.parent_id as parent_id, a.level as level, a.path as path,&lt;br /&gt;
                          a.image as imageInfo, a.latitude as latitude, a.longitude as longitude, a.alias as alias, a.language as language&#039;)&lt;br /&gt;
                          -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
                // Join over the categories.&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
                // Join with users table to get the username of the author&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join with users table to get the username of the person who checked the record out&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u2.username&#039;, &#039;editor&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u2&#039;) . &#039; ON u2.id = a.checked_out&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join with languages table to get the language title and image to display&lt;br /&gt;
                // Put these into fields called language_title and language_image so that &lt;br /&gt;
                // we can use the little com_content layout to display the map symbol&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;l.title&#039;, &#039;language_title&#039;) . &amp;quot;,&amp;quot; .$db-&amp;gt;quoteName(&#039;l.image&#039;, &#039;language_image&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__languages&#039;, &#039;l&#039;) . &#039; ON l.lang_code = a.language&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join over the associations - we just want to know if there are any, at this stage&lt;br /&gt;
                if (JLanguageAssociations::isEnabled())&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;select(&#039;COUNT(asso2.id)&amp;gt;1 as association&#039;)&lt;br /&gt;
                                -&amp;gt;join(&#039;LEFT&#039;, &#039;#__associations AS asso ON asso.id = a.id AND asso.context=&#039; . $db-&amp;gt;quote(&#039;com_helloworld.item&#039;))&lt;br /&gt;
                                -&amp;gt;join(&#039;LEFT&#039;, &#039;#__associations AS asso2 ON asso2.key = asso.key&#039;)&lt;br /&gt;
                                -&amp;gt;group(&#039;a.id&#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Join over the access levels, to get the name of the access level&lt;br /&gt;
                $query-&amp;gt;select(&#039;v.title AS access_level&#039;)&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, &#039;#__viewlevels AS v ON v.id = a.access&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Filter: like / search&lt;br /&gt;
                $search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
                if (!empty($search))&lt;br /&gt;
                {&lt;br /&gt;
                        $like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
                        $query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by published state&lt;br /&gt;
                $published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
                if (is_numeric($published))&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
                }&lt;br /&gt;
                elseif ($published === &#039;&#039;)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by language, if the user has set that in the filter field&lt;br /&gt;
                $language = $this-&amp;gt;getState(&#039;filter.language&#039;);&lt;br /&gt;
                if ($language)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;a.language = &#039; . $db-&amp;gt;quote($language));&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by categories&lt;br /&gt;
                $catid = $this-&amp;gt;getState(&#039;filter.category_id&#039;);&lt;br /&gt;
                if ($catid)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&amp;quot;a.catid = &amp;quot; . $db-&amp;gt;quote($db-&amp;gt;escape($catid)));&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Display only records to which the user has access&lt;br /&gt;
                if (!$user-&amp;gt;authorise(&#039;core.admin&#039;))  // ie if not SuperUser&lt;br /&gt;
                {&lt;br /&gt;
                        $userAccessLevels = implode(&#039;,&#039;, $user-&amp;gt;getAuthorisedViewLevels());&lt;br /&gt;
                        $query-&amp;gt;where(&#039;a.access IN (&#039; . $userAccessLevels . &#039;)&#039;);&lt;br /&gt;
                        $query-&amp;gt;where(&#039;c.access IN (&#039; . $userAccessLevels . &#039;)&#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // exclude root helloworld record&lt;br /&gt;
                $query-&amp;gt;where(&#039;a.id &amp;gt; 1&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Add the list ordering clause.&lt;br /&gt;
                $orderCol       = $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;lft&#039;);&lt;br /&gt;
                $orderDirn      = $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
                $query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
                return $query;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Front End Hello World Menuitem and Ajax Display == &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt; In the model for the single record display we set an item property &amp;lt;tt&amp;gt;canAccess&amp;lt;/tt&amp;gt;, depending upon whether the user has access to the record or not. Also we change the SQL query for the Ajax response to exclude those records which a logged-in user can&#039;t access.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;78-79,110-127,163,176-184&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
JLoader::register(&#039;HelloworldHelperRoute&#039;, JPATH_ROOT . &#039;/components/com_helloworld/helpers/route.php&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var object item&lt;br /&gt;
	 */&lt;br /&gt;
	protected $item;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to auto-populate the model state.&lt;br /&gt;
	 *&lt;br /&gt;
	 * This method should only be called once per instantiation and is designed&lt;br /&gt;
	 * to be called on the first call to the getState() method unless the model&lt;br /&gt;
	 * configuration flag to ignore the request is set.&lt;br /&gt;
	 *&lt;br /&gt;
	 * Note. Calling getState in this method will result in recursion.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	void&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function populateState()&lt;br /&gt;
	{&lt;br /&gt;
		// Get the message id&lt;br /&gt;
		$jinput = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
		$id     = $jinput-&amp;gt;get(&#039;id&#039;, 1, &#039;INT&#039;);&lt;br /&gt;
		$this-&amp;gt;setState(&#039;message.id&#039;, $id);&lt;br /&gt;
&lt;br /&gt;
		// Load the parameters.&lt;br /&gt;
		$this-&amp;gt;setState(&#039;params&#039;, JFactory::getApplication()-&amp;gt;getParams());&lt;br /&gt;
		parent::populateState();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
	 * @return object The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($id = null)&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;item) || !is_null($id)) &lt;br /&gt;
		{&lt;br /&gt;
			$id    = is_null($id) ? $this-&amp;gt;getState(&#039;message.id&#039;) : $id;&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.greeting, h.params, h.image as image, c.title as category, c.access as catAccess, &lt;br /&gt;
						h.latitude as latitude, h.longitude as longitude, h.access as access,&lt;br /&gt;
						h.id as id, h.alias as alias, h.catid as catid, h.parent_id as parent_id, h.level as level, h.description as description&#039;)&lt;br /&gt;
				  -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
				  -&amp;gt;leftJoin(&#039;#__categories as c ON h.catid=c.id&#039;)&lt;br /&gt;
				  -&amp;gt;where(&#039;h.id=&#039; . (int)$id);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery((string)$query);&lt;br /&gt;
		&lt;br /&gt;
			if ($this-&amp;gt;item = $db-&amp;gt;loadObject()) &lt;br /&gt;
			{&lt;br /&gt;
				// Load the JSON string&lt;br /&gt;
				$params = new JRegistry;&lt;br /&gt;
				$params-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;params, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Merge global params with item params&lt;br /&gt;
				$params = clone $this-&amp;gt;getState(&#039;params&#039;);&lt;br /&gt;
				$params-&amp;gt;merge($this-&amp;gt;item-&amp;gt;params);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Convert the JSON-encoded image info into an array&lt;br /&gt;
				$image = new JRegistry;&lt;br /&gt;
				$image-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;image, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;imageDetails = $image;&lt;br /&gt;
&lt;br /&gt;
				// Check if the user can access this record (and category)&lt;br /&gt;
				$user = JFactory::getUser();&lt;br /&gt;
				$userAccessLevels = $user-&amp;gt;getAuthorisedViewLevels();&lt;br /&gt;
				if ($user-&amp;gt;authorise(&#039;core.admin&#039;)) // ie superuser&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;item-&amp;gt;canAccess = true;&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					if ($this-&amp;gt;item-&amp;gt;catid == 0)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;item-&amp;gt;canAccess = in_array($this-&amp;gt;item-&amp;gt;access, $userAccessLevels);&lt;br /&gt;
					}&lt;br /&gt;
					else&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;item-&amp;gt;canAccess = in_array($this-&amp;gt;item-&amp;gt;access, $userAccessLevels) &amp;amp;&amp;amp; in_array($this-&amp;gt;item-&amp;gt;catAccess, $userAccessLevels);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				throw new Exception(&#039;Helloworld id not found&#039;, 404);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;item;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapParams()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;item) &lt;br /&gt;
		{&lt;br /&gt;
			$url = HelloworldHelperRoute::getAjaxURL();&lt;br /&gt;
			$this-&amp;gt;mapParams = array(&lt;br /&gt;
				&#039;latitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;latitude,&lt;br /&gt;
				&#039;longitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;longitude,&lt;br /&gt;
				&#039;zoom&#039; =&amp;gt; 10,&lt;br /&gt;
				&#039;greeting&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;greeting,&lt;br /&gt;
				&#039;ajaxurl&#039; =&amp;gt; $url&lt;br /&gt;
			);&lt;br /&gt;
			return $this-&amp;gt;mapParams; &lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(&#039;No helloworld details available for map&#039;, 500);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapSearchResults($mapbounds)&lt;br /&gt;
	{&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.id, h.alias, h.catid, h.greeting, h.latitude, h.longitude, h.access&#039;)&lt;br /&gt;
			   -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
			   -&amp;gt;where(&#039;h.latitude &amp;gt; &#039; . $mapbounds[&#039;minlat&#039;] . &lt;br /&gt;
				&#039; AND h.latitude &amp;lt; &#039; . $mapbounds[&#039;maxlat&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;gt; &#039; . $mapbounds[&#039;minlng&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;lt; &#039; . $mapbounds[&#039;maxlng&#039;]);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$user = JFactory::getUser();&lt;br /&gt;
			$loggedIn = $user-&amp;gt;get(&#039;guest&#039;) != 1;&lt;br /&gt;
			if ($loggedIn &amp;amp;&amp;amp; !$user-&amp;gt;authorise(&#039;core.admin&#039;))&lt;br /&gt;
			{&lt;br /&gt;
				$userAccessLevels = $user-&amp;gt;getAuthorisedViewLevels();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.access IN (&#039; . implode(&amp;quot;,&amp;quot;, $userAccessLevels) . &#039;)&#039;);&lt;br /&gt;
				$query-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = h.catid&#039;);&lt;br /&gt;
				$query-&amp;gt;where(&#039;(c.access IN (&#039; . implode(&amp;quot;,&amp;quot;, $userAccessLevels) . &#039;) OR h.catid = 0)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$results = $db-&amp;gt;loadObjectList(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			$msg = $e-&amp;gt;getMessage();&lt;br /&gt;
			JFactory::getApplication()-&amp;gt;enqueueMessage($msg, &#039;error&#039;); &lt;br /&gt;
			$results = null;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		for ($i = 0; $i &amp;lt; count($results); $i++) &lt;br /&gt;
		{&lt;br /&gt;
			$results[$i]-&amp;gt;url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $results[$i]-&amp;gt;id . &lt;br /&gt;
				&amp;quot;:&amp;quot; . $results[$i]-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $results[$i]-&amp;gt;catid . $query_lang);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $results; &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getChildren($id)&lt;br /&gt;
	{&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
		$children = $table-&amp;gt;getTree($id);&lt;br /&gt;
		return $children;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; In the view we handle the case of &amp;lt;tt&amp;gt;canAccess&amp;lt;/tt&amp;gt; being false. Note that there is a problem with Joomla&#039;s redirect functionality here. We provide a redirect to the com_users login form, and specify the url to access after logging in within the &amp;quot;return&amp;quot; parameter, as described in [[S:MyLanguage/How do you redirect users after a successful login%3f|How do you redirect users after a successful login]]. However, if the user enters the credentials into the Login Form module instead then that module encodes the return parameter based on a url which has already the return parameter set and it doesn&#039;t work. So ideally we either have to&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:58--&amp;gt; * omit the redirect to the com_users login form, and just assume the user will enter the details in the login module box, or,&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt; * redirect to the com_users login form, but we should find a means of removing the login module from that page (eg by redirecting to a specific hidden menuitem which displays the login form, but on which the login module is absent).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;31-32,42-59&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
		$user = JFactory::getUser();&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Take action based on whether the user has access to see the record or not&lt;br /&gt;
		$loggedIn = $user-&amp;gt;get(&#039;guest&#039;) != 1;&lt;br /&gt;
		if (!$this-&amp;gt;item-&amp;gt;canAccess)&lt;br /&gt;
		{&lt;br /&gt;
			if ($loggedIn)&lt;br /&gt;
			{&lt;br /&gt;
				$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
				$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				$return = base64_encode(JUri::getInstance());&lt;br /&gt;
				$login_url_with_return = JRoute::_(&#039;index.php?option=com_users&amp;amp;return=&#039; . $return, false);&lt;br /&gt;
				$app-&amp;gt;enqueueMessage(JText::_(&#039;COM_HELLOWORLD_MUST_LOGIN&#039;), &#039;notice&#039;);&lt;br /&gt;
				$app-&amp;gt;redirect($login_url_with_return, 403);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;addMap();&lt;br /&gt;
&lt;br /&gt;
		$tagsHelper = new JHelperTags;&lt;br /&gt;
		$this-&amp;gt;item-&amp;gt;tags = $tagsHelper-&amp;gt;getItemTags(&#039;com_helloworld.helloworld&#039; , $this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
		$model = $this-&amp;gt;getModel();&lt;br /&gt;
		$this-&amp;gt;parentItem = $model-&amp;gt;getItem($this-&amp;gt;item-&amp;gt;parent_id);&lt;br /&gt;
		$this-&amp;gt;children = $model-&amp;gt;getChildren($this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
		// getChildren includes the record itself (as well as the children) so remove this record&lt;br /&gt;
		unset($this-&amp;gt;children[0]);&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function addMap() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
&lt;br /&gt;
		// everything&#039;s dependent upon JQuery&lt;br /&gt;
		JHtml::_(&#039;jquery.framework&#039;);&lt;br /&gt;
&lt;br /&gt;
		// we need the Openlayers JS and CSS libraries&lt;br /&gt;
		$document-&amp;gt;addScript(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// ... and our own JS and CSS&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;media/com_helloworld/js/openstreetmap.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(JURI::root() . &amp;quot;media/com_helloworld/css/openstreetmap.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// get the data to pass to our JS code&lt;br /&gt;
		$params = $this-&amp;gt;get(&amp;quot;mapParams&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addScriptOptions(&#039;params&#039;, $params);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Frontend Category Display == &amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt; In the category model we post-process the helloworld records which have the specified category id, and for the records which the user can&#039;t access, we either remove them completely from the list (if the user is already logged in) or set the item &amp;lt;tt&amp;gt;canAccess&amp;lt;/tt&amp;gt; property to false (if the user isn&#039;t logged in). Note that by default the &amp;lt;tt&amp;gt;JCategories&amp;lt;/tt&amp;gt; methods which we use here remove records to which the user doesn&#039;t have access, so we specify in the constructor the options array set to &amp;lt;tt&amp;gt;array(&#039;access&#039; =&amp;gt; false)&amp;lt;/tt&amp;gt; so that all records are returned, and we perform the access checks ourselves.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/category.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/category.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;41,62,70,91-146&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Model for displaying the helloworld messages in a given category&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
class HelloworldModelCategory extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;alias&#039;,&lt;br /&gt;
				&#039;lft&#039;,&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	protected function populateState($ordering = null, $direction = null)&lt;br /&gt;
	{&lt;br /&gt;
		parent::populateState($ordering, $direction);&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
		$catid = $app-&amp;gt;input-&amp;gt;getInt(&#039;id&#039;);&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;setState(&#039;category.id&#039;, $catid);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$query-&amp;gt;select(&#039;id, greeting, alias, catid, access&#039;)&lt;br /&gt;
			-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;))&lt;br /&gt;
			-&amp;gt;where(&#039;catid = &#039; . $catid);&lt;br /&gt;
&lt;br /&gt;
		if (JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
			$query-&amp;gt;where(&#039;language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;lft&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;	&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getCategoryName()&lt;br /&gt;
	{&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$categories = JCategories::getInstance(&#039;Helloworld&#039;, array(&#039;access&#039; =&amp;gt; false));&lt;br /&gt;
		$categoryNode = $categories-&amp;gt;get($catid);   &lt;br /&gt;
		return $categoryNode-&amp;gt;title; &lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	public function getSubcategories()&lt;br /&gt;
	{&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$categories = JCategories::getInstance(&#039;Helloworld&#039;, array(&#039;access&#039; =&amp;gt; false));&lt;br /&gt;
		$categoryNode = $categories-&amp;gt;get($catid);&lt;br /&gt;
		$subcats = $categoryNode-&amp;gt;getChildren(); &lt;br /&gt;
        &lt;br /&gt;
		$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
		if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &#039;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		foreach ($subcats as $subcat)&lt;br /&gt;
		{&lt;br /&gt;
			$subcat-&amp;gt;url = JRoute::_(&amp;quot;index.php?view=category&amp;amp;id=&amp;quot; . $subcat-&amp;gt;id . $query_lang);&lt;br /&gt;
		}&lt;br /&gt;
		return $subcats;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getCategoryAccess()&lt;br /&gt;
	{&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$categories = JCategories::getInstance(&#039;Helloworld&#039;, array(&#039;access&#039; =&amp;gt; false));&lt;br /&gt;
		$categoryNode = $categories-&amp;gt;get($catid);   &lt;br /&gt;
		return $categoryNode-&amp;gt;access; &lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	public function getItems()&lt;br /&gt;
	{&lt;br /&gt;
		$items = parent::getItems();&lt;br /&gt;
		$user = JFactory::getUser();&lt;br /&gt;
		$loggedIn = $user-&amp;gt;get(&#039;guest&#039;) != 1;&lt;br /&gt;
&lt;br /&gt;
		if ($user-&amp;gt;authorise(&#039;core.admin&#039;)) // ie superuser&lt;br /&gt;
		{&lt;br /&gt;
			return $items;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$userAccessLevels = $user-&amp;gt;getAuthorisedViewLevels();&lt;br /&gt;
			$catAccess = $this-&amp;gt;getCategoryAccess();&lt;br /&gt;
			&lt;br /&gt;
			if (!in_array($catAccess, $userAccessLevels))&lt;br /&gt;
			{  // the user hasn&#039;t access to the category&lt;br /&gt;
				if ($loggedIn)&lt;br /&gt;
				{	&lt;br /&gt;
					return array();&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					foreach ($items as $item)&lt;br /&gt;
					{&lt;br /&gt;
						$item-&amp;gt;canAccess = false;&lt;br /&gt;
					}&lt;br /&gt;
					return $items;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			foreach ($items as $item) &lt;br /&gt;
			{&lt;br /&gt;
				if (!in_array($item-&amp;gt;access, $userAccessLevels))&lt;br /&gt;
				{&lt;br /&gt;
					if ($loggedIn)&lt;br /&gt;
					{&lt;br /&gt;
						unset($item);&lt;br /&gt;
					}&lt;br /&gt;
					else&lt;br /&gt;
					{&lt;br /&gt;
						$item-&amp;gt;canAccess = false;&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $items;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; In the category layout file we change the display if the &amp;lt;tt&amp;gt;canAccess&amp;lt;/tt&amp;gt; flag is set to false.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/category/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/category/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;63-67,77&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Layout file for displaying helloworld messages belonging to a given category&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;#&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;categoryName; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;?php&lt;br /&gt;
                echo JLayoutHelper::render(&lt;br /&gt;
                    &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                    array(&#039;view&#039; =&amp;gt; $this, &#039;searchButton&#039; =&amp;gt; false)&lt;br /&gt;
                );&lt;br /&gt;
            ?&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;thead&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;JGLOBAL_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th width=&amp;quot;20%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th width=&amp;quot;20%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLD_ALIAS_LABEL&#039;, &#039;alias&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th width=&amp;quot;20%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_FIELD_URL_LABEL&#039;); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;JGLOBAL_FIELD_ID_LABEL&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;/thead&amp;gt;&lt;br /&gt;
    &amp;lt;tfoot&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
    &amp;lt;tbody&amp;gt;&lt;br /&gt;
        &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
            &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) : &lt;br /&gt;
                if (isset($row-&amp;gt;canAccess) &amp;amp;&amp;amp; !$row-&amp;gt;canAccess) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;tr&amp;gt;&lt;br /&gt;
                        &amp;lt;td align=&amp;quot;center&amp;quot; colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;?php echo $row-&amp;gt;greeting . &amp;quot; - &amp;quot; . JText::_(&#039;COM_HELLOWORLD_MUST_LOGIN&#039;); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                    &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;?php else :&lt;br /&gt;
                    $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $row-&amp;gt;id . &#039;:&#039; . $row-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $row-&amp;gt;catid . $query_lang);&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                    &amp;lt;tr&amp;gt;&lt;br /&gt;
                        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;?php echo $row-&amp;gt;alias; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $url; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                    &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
        &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
    &amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HEADER_SUBCATEGORIES&#039;); ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;?php foreach ($this-&amp;gt;subcategories as $subcategory) : ?&amp;gt;&lt;br /&gt;
    &amp;lt;h3&amp;gt;&amp;lt;a href=&amp;quot;&amp;lt;?php echo $subcategory-&amp;gt;url; ?&amp;gt;&amp;quot;&amp;gt; &amp;lt;?php echo $subcategory-&amp;gt;title; ?&amp;gt; &amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&amp;lt;?php echo $subcategory-&amp;gt;description; ?&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Updated Language Strings == &amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;100-101&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE=&amp;quot;Language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_POSITION=&amp;quot;Position&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_DESC=&amp;quot;Message description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_LABEL=&amp;quot;Description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL=&amp;quot;Latitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC=&amp;quot;Enter the position latitude, between -90 and +90 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL=&amp;quot;Longitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC=&amp;quot;Enter the position longitude, between -180 and +180 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the parent record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_FIRST=&amp;quot;-- First record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_LAST=&amp;quot;-- Last record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_TEXT=&amp;quot;Ordering will be available after saving.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC=&amp;quot;Select the appropriate language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_IMAGE_FIELDS=&amp;quot;Image details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL=&amp;quot;Select image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC=&amp;quot;Select an image from the library, or upload a new one&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC=&amp;quot;Alternative text (if image cannot be displayed)&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC=&amp;quot;Provide a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_ASSOCIATIONS=&amp;quot;Message Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_IMAGE=&amp;quot;Image info&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_ASC=&amp;quot;Language ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_DESC=&amp;quot;Language descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_ASC=&amp;quot;Association ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_DESC=&amp;quot;Association descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_ASC=&amp;quot;Access ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DESC=&amp;quot;Access descending&amp;quot;&lt;br /&gt;
; Helloworld menuitem - selecting a greeting via modal&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_MODAL_TITLE=&amp;quot;Select greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD=&amp;quot;Select&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_BUTTON_TOOLTIP=&amp;quot;Select a helloworld greeting&amp;quot;&lt;br /&gt;
; Checking in records&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_0=&amp;quot;No records checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_1=&amp;quot;%d record successfully checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_MORE=&amp;quot;%d records successfully checked in.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;56-57&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Any characters allowed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_IMAGE_LABEL=&amp;quot;Image information&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_PICTURE_LABEL=&amp;quot;Image file to upload&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_PICTURE_DESC=&amp;quot;Select the file with the image to upload&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CAPTION_DESC=&amp;quot;Text to use as a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALTTEXT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALTTEXT_DESC=&amp;quot;Text to display if image cannot be shown&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the record which is to be the parent&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
; file upload error conditions&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILEUPLOAD=&amp;quot;PHP Error %s encountered when uploading file&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILETOOLARGE=&amp;quot;Upload file exceeds max size configured in Joomla&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_BADFILENAME=&amp;quot;Upload file has an invalid filename&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILE_EXISTS=&amp;quot;Upload file already exists&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_UNABLE_TO_UPLOAD_FILE=&amp;quot;Error creating uploaded file&amp;quot;&lt;br /&gt;
; helloworld greeting page&lt;br /&gt;
COM_HELLOWORLD_PARENT=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CHILDREN=&amp;quot;Children&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SEARCH_HERE_BUTTON=&amp;quot;Search here&amp;quot;&lt;br /&gt;
; Ajax handling errors&lt;br /&gt;
COM_HELLOWORLD_ERROR_NO_RECORDS=&amp;quot;Didn&#039;t get any records&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_NO_MAP_BOUNDS=&amp;quot;Error: no map bounds&amp;quot;&lt;br /&gt;
; category view, search and ordering fields and headings&lt;br /&gt;
COM_HELLOWORLD_SORT_BY=&amp;quot;Sort by ...&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID_ASC=&amp;quot;id asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID_DESC=&amp;quot;id desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ALIAS_ASC=&amp;quot;alias asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ALIAS_DESC=&amp;quot;alias desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALIAS_LABEL=&amp;quot;Alias&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_URL_LABEL=&amp;quot;URL&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HEADER_SUBCATEGORIES=&amp;quot;Subcategories&amp;quot;&lt;br /&gt;
; Access errors&lt;br /&gt;
COM_HELLOWORLD_MUST_LOGIN=&amp;quot;You must login before trying to view this item&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the Component == &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/router.php|site/router.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/view.json.php|site/views/helloworld/view.json.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/view.html.php|site/views/category/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/views/category/tmpl/default.php|site/views/category/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#site/views/category/tmpl/default.xml|site/views/category/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/models/category.php|site/models/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/filter_category.xml|site/models/forms/filter_category.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Access#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/helpers/route.php|site/helpers/route.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/category.php|site/helpers/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/helpers/association.php|site/helpers/association.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/associations.php|admin/helpers/associations.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/html/helloworlds.php|admin/helpers/html/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/html/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/sql/updates/mysql/0.0.17.sql|admin/sql/updates/mysql/0.0.17.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#admin/sql/updates/mysql/0.0.18.sql|admin/sql/updates/mysql/0.0.18.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/sql/updates/mysql/0.0.20.sql|admin/sql/updates/mysql/0.0.20.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/updates/mysql/0.0.21.sql|admin/sql/updates/mysql/0.0.21.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Checkout#admin/sql/updates/mysql/0.0.24.sql|admin/sql/updates/mysql/0.0.24.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Ordering#admin/sql/updates/mysql/0.0.25.sql|admin/sql/updates/mysql/0.0.25.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/updates/mysql/0.0.26.sql|admin/sql/updates/mysql/0.0.26.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/sql/updates/mysql/0.0.27.sql|admin/sql/updates/mysql/0.0.27.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/sql/updates/mysql/0.0.28.sql|admin/sql/updates/mysql/0.0.28.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/sql/updates/mysql/0.0.29.sql|admin/sql/updates/mysql/0.0.29.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldordering.php|admin/models/fields/helloworldordering.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldparent.php|admin/models/fields/helloworldparent.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/modal/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/models/fields/modal/helloworld.php|admin/models/fields/modal/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworlds/tmpl/modal.php|admin/views/helloworlds/tmpl/modal.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Access#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/js/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#media/js/openstreetmap.js|media/js/openstreetmap.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#media/js/admin-helloworlds-modal.js|media/js/admin-helloworlds-modal.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/css/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#index.html|media/css/openstreetmap.css]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.29&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;router.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;js&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;css&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Tags|&amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt; Prev: Adding Tags&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a batch process|&amp;lt;translate&amp;gt;&amp;lt;!--T:68--&amp;gt; Next: Adding a batch process&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Tags&amp;diff=650682</id>
		<title>J3.x:Developing an MVC Component/Adding Tags</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Tags&amp;diff=650682"/>
		<updated>2020-03-20T17:35:10Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: published column added since https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_Levels as we can&amp;#039;t publish items without having our helloworld root record published.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:2--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; In this step we add tags to our helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
A video accompanying this step is available at [https://youtu.be/xWkLgaEMNvI Adding Tags].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=xWkLgaEMNvI}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; Tags give an alternative view which enables visitors to a website to explore the content by subject matter, via the tags which have been assigned to items, rather than through the website menu structure. Joomla allows you to add tags to articles, newsfeeds, categories and contacts, amongst other items, and while an item may belong to at most one category, an item may have multiple tags. In this step we extend this functionality to our helloworld records and categories.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; Joomla has designed the tags functionality on top of the UCM (Unified Content Model) tables in the database. The UCM was a concept which was only partly developed in Joomla, and has an uncertain future. For the various types of content in Joomla – articles, contacts, newsfeeds, etc – it aimed at storing common information in a common database table (the ucm_content table, together with the associated ucm_base table), and only the fields which were special to that content type in a separate table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[File:joomla-tags-er.jpg|right|400px|Joomla Tags E-R diagram]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; The Joomla tags functionality is built on top of UCM, as shown in the entity-relationship diagram, with the contentitem_tag_map table implementing the many-many relationship between tags and items of content. For us this means that we need to have key fields from the helloworld records and categories copied into the ucm_content table, and we enable this by specifying configuration data in the content_types table, similar to what we did in the last step [[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_Versioning|Adding Versioning]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; Joomla tags uses the same Observer pattern as Joomla versioning: whenever a record is stored in the JTable class, the onBeforeStore, onAfterStore and onBeforeDelete events are picked up by the tags code, and when a tag is first set on a record it copies the fields from the original record into the ucm_content table, using the field mapping defined in the content_types configuration data, and also writes an abridged record into the ucm_base table. It then writes a contentitem_tag_map record which links to the ucm_content and tags records, to store the fact that tag x is specified against content item y.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; Some details of how to include tags functionality in an extension are given in [[S:MyLanguage/J3.x:Using_Tags_in_an_Extension|Using Tags in an Extension]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
In our database files we add the configuration data to the helloworld content_types records which will enable the Joomla tags functionality to copy the important fields from our helloworld records and helloworld category records to the ucm_content records.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; We add the code to our helloworld table class to get the tags observer to subscribe to events associated with our helloworld table class. Adding this in the constructor of our helloworld table class means that this will apply to both the back end and front end, as both use the same helloworld table code.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; We add a standard Joomla tags field to our admin form for editing a helloworld record, and to our front end form for creating a helloworld record. The tags field has 2 modes of operation, see [[S:MyLanguage/Tag_form_field_type|Tag form field type]]:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; nested: the tags are presented as a fixed list from which the user can select one or more (assuming the field option &amp;lt;tt&amp;gt;multiple=&amp;quot;true&amp;quot;&amp;lt;/tt&amp;gt; is set). Tags are implemented as a tree in a Nested Table structure, so in the presentation within the tags field subtags are indented, in the same way as submenus and subcategories are indented in those admin forms.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; ajax (default): the tags are presented as a list, but as a list of nested table paths, rather than having subtags indented. In addition the user may enter free text: when a number of characters are entered Joomla executes an Ajax request to the server to find tags matching the entered text. If no matching tags are found the user can create a new tag on the fly this way, except if the option &amp;lt;tt&amp;gt;custom=&amp;quot;deny&amp;quot;&amp;lt;/tt&amp;gt; is added to the tags field.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; We use the ajax mode on the admin form, and the nested mode on the front end form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; With regard to presentation of the tags which a record has, on the back end admin edit form we want to show what tags are already present by pre-populating the tags field, so within our model code we get this data from the database. We&#039;ll not display the tags in the admin helloworlds form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; On the front end, we&#039;ll display the tags associated with a helloworld record in the Hello World menuitem, and for this we&#039;ll use a standard Joomla layout.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Database == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; In our database update file we add into the content_types records the table and field mapping information which will enable those field values to be copied into the ucm_content table. For the category records we just follow the example of Joomla core components. For the helloworld records we need to consider what tag-related data might be shown on other web pages, for example, if the administrator created a menuitem pointing to one of the Tags menu item types. Such pages will have links to the helloworld records, so fields such as alias and language which are used in the construction of the URLs should be included. The &amp;quot;special&amp;quot; field mappings aren&#039;t currently used, so it&#039;s safe to omit those.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; Administrators can set up front end Menu Item Types (of type Tags) which display links to items which have specific tags. In the case where an item is a helloworld record or a helloworld category record Joomla will look for a route helper method to be specified in the ucm_content router field, so we update the records to contain values for these. We define these methods below in the Site Route Helper section.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.28.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/updates/mysql/0.0.28.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
UPDATE `#__content_types` SET&lt;br /&gt;
`table` = &#039;{&amp;quot;special&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__helloworld&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Helloworld&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;HelloworldTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;},&lt;br /&gt;
&amp;quot;common&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__ucm_content&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;ucm_id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Corecontent&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;}}&#039;,&lt;br /&gt;
`field_mappings` = &lt;br /&gt;
&#039;{&amp;quot;common&amp;quot;: {&lt;br /&gt;
    &amp;quot;core_content_item_id&amp;quot;: &amp;quot;id&amp;quot;,&lt;br /&gt;
    &amp;quot;core_title&amp;quot;: &amp;quot;greeting&amp;quot;,&lt;br /&gt;
    &amp;quot;core_state&amp;quot;: &amp;quot;published&amp;quot;,&lt;br /&gt;
    &amp;quot;core_alias&amp;quot;: &amp;quot;alias&amp;quot;,&lt;br /&gt;
    &amp;quot;core_language&amp;quot;:&amp;quot;language&amp;quot;, &lt;br /&gt;
    &amp;quot;core_created_time&amp;quot;: &amp;quot;created&amp;quot;,&lt;br /&gt;
    &amp;quot;core_body&amp;quot;: &amp;quot;description&amp;quot;,&lt;br /&gt;
    &amp;quot;core_catid&amp;quot;: &amp;quot;catid&amp;quot;&lt;br /&gt;
  }}&#039;,&lt;br /&gt;
`router` = &#039;HelloworldHelperRoute::getHelloworldRoute&#039;&lt;br /&gt;
WHERE `type_alias` = &#039;com_helloworld.helloworld&#039;;&lt;br /&gt;
&lt;br /&gt;
UPDATE `#__content_types` SET&lt;br /&gt;
`table` = &#039;{&amp;quot;special&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Category&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;},&lt;br /&gt;
&amp;quot;common&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__ucm_content&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;ucm_id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Corecontent&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;}}&#039;,&lt;br /&gt;
`field_mappings` = &lt;br /&gt;
&#039;{&amp;quot;common&amp;quot;: {&lt;br /&gt;
	&amp;quot;core_content_item_id&amp;quot;:&amp;quot;id&amp;quot;,&lt;br /&gt;
	&amp;quot;core_title&amp;quot;:&amp;quot;title&amp;quot;,&lt;br /&gt;
	&amp;quot;core_state&amp;quot;:&amp;quot;published&amp;quot;,&lt;br /&gt;
	&amp;quot;core_alias&amp;quot;:&amp;quot;alias&amp;quot;,&lt;br /&gt;
	&amp;quot;core_created_time&amp;quot;:&amp;quot;created_time&amp;quot;,&lt;br /&gt;
	&amp;quot;core_modified_time&amp;quot;:&amp;quot;modified_time&amp;quot;,&lt;br /&gt;
	&amp;quot;core_body&amp;quot;:&amp;quot;description&amp;quot;, &lt;br /&gt;
	&amp;quot;core_hits&amp;quot;:&amp;quot;hits&amp;quot;,&lt;br /&gt;
	&amp;quot;core_publish_up&amp;quot;:&amp;quot;null&amp;quot;,&lt;br /&gt;
	&amp;quot;core_publish_down&amp;quot;:&amp;quot;null&amp;quot;,&lt;br /&gt;
	&amp;quot;core_access&amp;quot;:&amp;quot;access&amp;quot;, &lt;br /&gt;
	&amp;quot;core_params&amp;quot;:&amp;quot;params&amp;quot;, &lt;br /&gt;
	&amp;quot;core_featured&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metadata&amp;quot;:&amp;quot;metadata&amp;quot;, &lt;br /&gt;
	&amp;quot;core_language&amp;quot;:&amp;quot;language&amp;quot;, &lt;br /&gt;
	&amp;quot;core_images&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_urls&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_version&amp;quot;:&amp;quot;version&amp;quot;,&lt;br /&gt;
	&amp;quot;core_ordering&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metakey&amp;quot;:&amp;quot;metakey&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metadesc&amp;quot;:&amp;quot;metadesc&amp;quot;, &lt;br /&gt;
	&amp;quot;core_catid&amp;quot;:&amp;quot;parent_id&amp;quot;, &lt;br /&gt;
	&amp;quot;core_xreference&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;asset_id&amp;quot;:&amp;quot;asset_id&amp;quot;}, &lt;br /&gt;
  &amp;quot;special&amp;quot;:{&lt;br /&gt;
    &amp;quot;parent_id&amp;quot;:&amp;quot;parent_id&amp;quot;,&lt;br /&gt;
	&amp;quot;lft&amp;quot;:&amp;quot;lft&amp;quot;,&lt;br /&gt;
	&amp;quot;rgt&amp;quot;:&amp;quot;rgt&amp;quot;,&lt;br /&gt;
	&amp;quot;level&amp;quot;:&amp;quot;level&amp;quot;,&lt;br /&gt;
	&amp;quot;path&amp;quot;:&amp;quot;path&amp;quot;,&lt;br /&gt;
	&amp;quot;extension&amp;quot;:&amp;quot;extension&amp;quot;,&lt;br /&gt;
	&amp;quot;note&amp;quot;:&amp;quot;note&amp;quot;}}&#039;,&lt;br /&gt;
`router` = &#039;HelloworldHelperRoute::getCategoryRoute&#039;&lt;br /&gt;
WHERE `type_alias` = &#039;com_helloworld.category&#039;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;38,48-61,71-107&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out` INT(10) NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out_time` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`description` VARCHAR(4000) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`alias`  VARCHAR(40)  NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
    `language`  CHAR(7)  NOT NULL DEFAULT &#039;*&#039;,&lt;br /&gt;
	`parent_id`	int(10)    NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`level`	int(10)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`path`	VARCHAR(400)    NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`lft`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`rgt`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`image`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`latitude` DECIMAL(9,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	`longitude` DECIMAL(10,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
CREATE UNIQUE INDEX `aliasindex` ON `#__helloworld` (`alias`, `catid`);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`,`alias`,`language`, `parent_id`, `level`, `path`, `lft`, `rgt`, `published`) VALUES&lt;br /&gt;
(&#039;helloworld root&#039;,&#039;helloworld-root-alias&#039;,&#039;en-GB&#039;, 0, 0, &#039;&#039;, 0, 5, 1),&lt;br /&gt;
(&#039;Hello World!&#039;,&#039;hello-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;hello-world&#039;, 1, 2, 0),&lt;br /&gt;
(&#039;Goodbye World!&#039;,&#039;goodbye-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;goodbye-world&#039;, 3, 4, 0);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__content_types` (`type_title`, `type_alias`, `content_history_options`, `table`, `field_mappings`, `router`) &lt;br /&gt;
VALUES&lt;br /&gt;
(&#039;Helloworld&#039;, &#039;com_helloworld.helloworld&#039;, &lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_helloworld\\/models\\/forms\\/helloworld.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_by&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__helloworld&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;greeting&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;catid&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;,&lt;br /&gt;
&#039;{&amp;quot;special&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__helloworld&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Helloworld&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;HelloworldTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;},&lt;br /&gt;
&amp;quot;common&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__ucm_content&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;ucm_id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Corecontent&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;}}&#039;,&lt;br /&gt;
&#039;{&amp;quot;common&amp;quot;: {&lt;br /&gt;
    &amp;quot;core_content_item_id&amp;quot;: &amp;quot;id&amp;quot;,&lt;br /&gt;
    &amp;quot;core_title&amp;quot;: &amp;quot;greeting&amp;quot;,&lt;br /&gt;
    &amp;quot;core_state&amp;quot;: &amp;quot;published&amp;quot;,&lt;br /&gt;
    &amp;quot;core_alias&amp;quot;: &amp;quot;alias&amp;quot;,&lt;br /&gt;
    &amp;quot;core_language&amp;quot;:&amp;quot;language&amp;quot;, &lt;br /&gt;
    &amp;quot;core_created_time&amp;quot;: &amp;quot;created&amp;quot;,&lt;br /&gt;
    &amp;quot;core_body&amp;quot;: &amp;quot;description&amp;quot;,&lt;br /&gt;
    &amp;quot;core_catid&amp;quot;: &amp;quot;catid&amp;quot;&lt;br /&gt;
  }}&#039;,&lt;br /&gt;
&#039;HelloworldHelperRoute::getHelloworldRoute&#039;),&lt;br /&gt;
(&#039;Helloworld Category&#039;, &#039;com_helloworld.category&#039;,&lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;,&amp;quot;extension&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;modified_user_id&amp;quot;, &amp;quot;modified_time&amp;quot;, &amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;version&amp;quot;, &amp;quot;hits&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[&amp;quot;publish_up&amp;quot;, &amp;quot;publish_down&amp;quot;], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;access&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__viewlevels&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;modified_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;,&lt;br /&gt;
&#039;{&amp;quot;special&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Category&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;},&lt;br /&gt;
&amp;quot;common&amp;quot;:{&amp;quot;dbtable&amp;quot;:&amp;quot;#__ucm_content&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;ucm_id&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;Corecontent&amp;quot;,&amp;quot;prefix&amp;quot;:&amp;quot;JTable&amp;quot;,&amp;quot;config&amp;quot;:&amp;quot;array()&amp;quot;}}&#039;,&lt;br /&gt;
&#039;{&amp;quot;common&amp;quot;: {&lt;br /&gt;
	&amp;quot;core_content_item_id&amp;quot;:&amp;quot;id&amp;quot;,&lt;br /&gt;
	&amp;quot;core_title&amp;quot;:&amp;quot;title&amp;quot;,&lt;br /&gt;
	&amp;quot;core_state&amp;quot;:&amp;quot;published&amp;quot;,&lt;br /&gt;
	&amp;quot;core_alias&amp;quot;:&amp;quot;alias&amp;quot;,&lt;br /&gt;
	&amp;quot;core_created_time&amp;quot;:&amp;quot;created_time&amp;quot;,&lt;br /&gt;
	&amp;quot;core_modified_time&amp;quot;:&amp;quot;modified_time&amp;quot;,&lt;br /&gt;
	&amp;quot;core_body&amp;quot;:&amp;quot;description&amp;quot;, &lt;br /&gt;
	&amp;quot;core_hits&amp;quot;:&amp;quot;hits&amp;quot;,&lt;br /&gt;
	&amp;quot;core_publish_up&amp;quot;:&amp;quot;null&amp;quot;,&lt;br /&gt;
	&amp;quot;core_publish_down&amp;quot;:&amp;quot;null&amp;quot;,&lt;br /&gt;
	&amp;quot;core_access&amp;quot;:&amp;quot;access&amp;quot;, &lt;br /&gt;
	&amp;quot;core_params&amp;quot;:&amp;quot;params&amp;quot;, &lt;br /&gt;
	&amp;quot;core_featured&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metadata&amp;quot;:&amp;quot;metadata&amp;quot;, &lt;br /&gt;
	&amp;quot;core_language&amp;quot;:&amp;quot;language&amp;quot;, &lt;br /&gt;
	&amp;quot;core_images&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_urls&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_version&amp;quot;:&amp;quot;version&amp;quot;,&lt;br /&gt;
	&amp;quot;core_ordering&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metakey&amp;quot;:&amp;quot;metakey&amp;quot;, &lt;br /&gt;
	&amp;quot;core_metadesc&amp;quot;:&amp;quot;metadesc&amp;quot;, &lt;br /&gt;
	&amp;quot;core_catid&amp;quot;:&amp;quot;parent_id&amp;quot;, &lt;br /&gt;
	&amp;quot;core_xreference&amp;quot;:&amp;quot;null&amp;quot;, &lt;br /&gt;
	&amp;quot;asset_id&amp;quot;:&amp;quot;asset_id&amp;quot;}, &lt;br /&gt;
  &amp;quot;special&amp;quot;:{&lt;br /&gt;
    &amp;quot;parent_id&amp;quot;:&amp;quot;parent_id&amp;quot;,&lt;br /&gt;
	&amp;quot;lft&amp;quot;:&amp;quot;lft&amp;quot;,&lt;br /&gt;
	&amp;quot;rgt&amp;quot;:&amp;quot;rgt&amp;quot;,&lt;br /&gt;
	&amp;quot;level&amp;quot;:&amp;quot;level&amp;quot;,&lt;br /&gt;
	&amp;quot;path&amp;quot;:&amp;quot;path&amp;quot;,&lt;br /&gt;
	&amp;quot;extension&amp;quot;:&amp;quot;extension&amp;quot;,&lt;br /&gt;
	&amp;quot;note&amp;quot;:&amp;quot;note&amp;quot;}}&#039;,&lt;br /&gt;
&#039;HelloworldHelperRoute::getCategoryRoute&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; In our uninstall sql script we need to remove any helloworld records which have been copied into the ucm_base and ucm_content tables, and also remove any links to helloworld records in the tag link table contentitem_tag_map.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/uninstall.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/uninstall.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;4-7&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
DELETE FROM `#__ucm_history` WHERE ucm_type_id in &lt;br /&gt;
	(select type_id from `#__content_types` where type_alias in (&#039;com_helloworld.helloworld&#039;,&#039;com_helloworld.category&#039;));&lt;br /&gt;
DELETE FROM `#__ucm_base` WHERE ucm_type_id in &lt;br /&gt;
	(select type_id from `#__content_types` WHERE type_alias in (&#039;com_helloworld.helloworld&#039;,&#039;com_helloworld.category&#039;));&lt;br /&gt;
DELETE FROM `#__ucm_content` WHERE core_type_alias in (&#039;com_helloworld.helloworld&#039;,&#039;com_helloworld.category&#039;);&lt;br /&gt;
DELETE FROM `#__contentitem_tag_map`WHERE type_alias in (&#039;com_helloworld.helloworld&#039;,&#039;com_helloworld.category&#039;);&lt;br /&gt;
DELETE FROM `#__content_types` WHERE type_alias in (&#039;com_helloworld.helloworld&#039;,&#039;com_helloworld.category&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Setup Tags Observer == &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; In the [[S:MyLanguage/J3.x:Developing an MVC Component/Adding Versioning|Adding Versioning]] step we used the &amp;lt;tt&amp;gt;JObserverMapper::addObserverClassToClass()&amp;lt;/tt&amp;gt; function to set up the ContentHistory observer. In this step we use the alternative mechanism, using &amp;lt;tt&amp;gt;JTableObserverTags::createObserver()&amp;lt;/tt&amp;gt; to set up the Tags observer. We call this in our helloworld table constructor, ensuring that it&#039;s called after the parent constructor.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/tables/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;28&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTableNested&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   JDatabaseDriver  &amp;amp;$db  A database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db)&lt;br /&gt;
	{&lt;br /&gt;
		JObserverMapper::addObserverClassToClass(&#039;JTableObserverContenthistory&#039;, &#039;HelloWorldTableHelloWorld&#039;, array(&#039;typeAlias&#039; =&amp;gt; &#039;com_helloworld.helloworld&#039;));&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
		JTableObserverTags::createObserver($this, array(&#039;typeAlias&#039; =&amp;gt; &#039;com_helloworld.helloworld&#039;));&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
        if (isset($array[&#039;imageinfo&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;imageinfo&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the imageinfo array to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;imageinfo&#039;]);&lt;br /&gt;
			$array[&#039;image&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
        // Bind the rules.&lt;br /&gt;
		if (isset($array[&#039;rules&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;rules&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$rules = new JAccessRules($array[&#039;rules&#039;]);&lt;br /&gt;
			$this-&amp;gt;setRules($rules);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		if (isset($array[&#039;parent_id&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			if (!isset($array[&#039;id&#039;]) || $array[&#039;id&#039;] == 0)&lt;br /&gt;
			{   // new record&lt;br /&gt;
				$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
			}&lt;br /&gt;
			elseif (isset($array[&#039;helloworldordering&#039;]))&lt;br /&gt;
			{&lt;br /&gt;
				// when saving a record load() is called before bind() so the table instance will have properties which are the existing field values&lt;br /&gt;
				if ($this-&amp;gt;parent_id == $array[&#039;parent_id&#039;])&lt;br /&gt;
				{&lt;br /&gt;
					// If first is chosen make the item the first child of the selected parent.&lt;br /&gt;
					if ($array[&#039;helloworldordering&#039;] == -1)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;first-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// If last is chosen make it the last child of the selected parent.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] == -2)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Don&#039;t try to put an item after itself. All other ones put after the selected item.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id != $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;helloworldordering&#039;], &#039;after&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Just leave it where it is if no change is made.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id == $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						unset($array[&#039;helloworldordering&#039;]);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				// Set the new parent id if parent id not matched and put in last position&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.helloworld.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the asset-parent-id of the item&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId(JTable $table = NULL, $id = NULL)&lt;br /&gt;
	{&lt;br /&gt;
		// We will retrieve the parent-asset from the Asset-table&lt;br /&gt;
		$assetParent = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		// Default: if no asset-parent can be found we take the global asset&lt;br /&gt;
		$assetParentId = $assetParent-&amp;gt;getRootId();&lt;br /&gt;
&lt;br /&gt;
		// Find the parent-asset&lt;br /&gt;
		if (($this-&amp;gt;catid)&amp;amp;&amp;amp; !empty($this-&amp;gt;catid))&lt;br /&gt;
		{&lt;br /&gt;
			// The item has a category as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld.category.&#039; . (int) $this-&amp;gt;catid);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// The item has the component as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Return the found asset-parent-id&lt;br /&gt;
		if ($assetParent-&amp;gt;id)&lt;br /&gt;
		{&lt;br /&gt;
			$assetParentId=$assetParent-&amp;gt;id;&lt;br /&gt;
		}&lt;br /&gt;
		return $assetParentId;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function check()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;alias = trim($this-&amp;gt;alias);&lt;br /&gt;
		if (empty($this-&amp;gt;alias))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;alias = $this-&amp;gt;greeting;&lt;br /&gt;
		}&lt;br /&gt;
		$this-&amp;gt;alias = JFilterOutput::stringURLSafe($this-&amp;gt;alias);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function delete($pk = null, $children = false)&lt;br /&gt;
	{&lt;br /&gt;
		return parent::delete($pk, $children);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Admin Edit Form == &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
In the admin edit form we add the standard Joomla Tags field, allowing the administrator to select multiple tags, and also to create a new tag on the fly.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; We also add a Status field, which we set to 1 (published) by default. The reason for this is that our &amp;lt;tt&amp;gt;published&amp;lt;/tt&amp;gt; field in the database has a default of 1, so that new helloworld records by default get a status of published. However, the equivalent field &amp;lt;tt&amp;gt;state&amp;lt;/tt&amp;gt; in the ucm_content table is set to zero by default, signifying unpublished. In that case, if we used some of the Joomla functionality to display the items associated with a certain tag, then our helloworld record wouldn&#039;t appear, as Joomla shows only published items. When we include our status field in the form, then its value gets copied into the ucm_content record (based on our field mapping above), and so matching its value in the helloworld record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;74-95&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
				addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
                &amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox validate-greeting&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;latitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-90.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;90.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;longitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-180.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;180.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field  &lt;br /&gt;
                name=&amp;quot;language&amp;quot; &lt;br /&gt;
        		type=&amp;quot;contentlanguage&amp;quot; &lt;br /&gt;
                label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;published&amp;quot; &lt;br /&gt;
				type=&amp;quot;list&amp;quot; &lt;br /&gt;
				label=&amp;quot;JSTATUS&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_PUBLISHED_DESC&amp;quot; &lt;br /&gt;
				class=&amp;quot;chzn-color-state&amp;quot;&lt;br /&gt;
				filter=&amp;quot;intval&amp;quot; 	&lt;br /&gt;
				size=&amp;quot;1&amp;quot; &lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
				JPUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
				JUNPUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;tags&amp;quot; &lt;br /&gt;
				type=&amp;quot;tag&amp;quot;&lt;br /&gt;
				label=&amp;quot;JTAG&amp;quot; &lt;br /&gt;
				description=&amp;quot;JTAG_DESC&amp;quot;&lt;br /&gt;
				multiple=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_ORDERING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ORDERING_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&lt;br /&gt;
				size=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;version_note&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELD_VERSION_NOTE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JGLOBAL_FIELD_VERSION_NOTE_DESC&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot; &lt;br /&gt;
				size=&amp;quot;45&amp;quot;&lt;br /&gt;
				labelclass=&amp;quot;control-label&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;description&amp;quot; &lt;br /&gt;
				type=&amp;quot;editor&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_LABEL&amp;quot; &lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;JComponentHelper::filterText&amp;quot; &lt;br /&gt;
				buttons=&amp;quot;true&amp;quot; &lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;imageinfo&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;image-info&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_IMAGE_FIELDS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
                name=&amp;quot;image&amp;quot;&lt;br /&gt;
                type=&amp;quot;media&amp;quot;&lt;br /&gt;
                preview=&amp;quot;tooltip&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;field name=&amp;quot;alt&amp;quot;&lt;br /&gt;
                type=&amp;quot;text&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC&amp;quot;&lt;br /&gt;
                size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;field name=&amp;quot;caption&amp;quot;&lt;br /&gt;
                type=&amp;quot;text&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC&amp;quot;&lt;br /&gt;
                size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;params&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELDSET_DISPLAY_OPTIONS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
					type=&amp;quot;list&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
					default=&amp;quot;&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_USE_GLOBAL&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;accesscontrol&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FIELDSET_RULES&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;asset_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				filter=&amp;quot;unset&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;rules&amp;quot;&lt;br /&gt;
				type=&amp;quot;rules&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_FIELD_RULES_LABEL&amp;quot;&lt;br /&gt;
				filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
				validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				section=&amp;quot;message&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt; In the form we need to pre-populate the field with any existing tags set on that record, and we do that in the model &amp;lt;tt&amp;gt;getItem()&amp;lt;/tt&amp;gt;. We only need to provide the ids of the tags already set. The titles of all the available tags and their corresponding ids will be obtained in the list of options for the html &amp;lt;tt&amp;gt;&amp;lt;select&amp;gt;&amp;lt;/tt&amp;gt; statement, and the tags already present will get the &amp;lt;tt&amp;gt;selected&amp;lt;/tt&amp;gt; attribute set based on matching their ids against the list of options. (Note that the html &amp;lt;tt&amp;gt;&amp;lt;select&amp;gt;&amp;lt;/tt&amp;gt; statement gets converted by the [https://harvesthq.github.io/chosen/ Chosen] javascript library, so you don&#039;t see it on the web page source).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;31,42-46&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
    // JModelAdmin needs to know this for storing the associations &lt;br /&gt;
	protected $associationsContext = &#039;com_helloworld.item&#039;;&lt;br /&gt;
    &lt;br /&gt;
	// Contenthistory needs to know this for restoring previous versions&lt;br /&gt;
	public $typeAlias = &#039;com_helloworld.helloworld&#039;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override getItem to allow us to convert the JSON-encoded image information&lt;br /&gt;
	 * in the database record into an array for subsequent prefilling of the edit form&lt;br /&gt;
	 * We also use this method to prefill the tags and associations&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($pk = null)&lt;br /&gt;
	{&lt;br /&gt;
		$item = parent::getItem($pk);&lt;br /&gt;
		if ($item AND property_exists($item, &#039;image&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			$registry = new Registry($item-&amp;gt;image);&lt;br /&gt;
			$item-&amp;gt;imageinfo = $registry-&amp;gt;toArray();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (!empty($item-&amp;gt;id))&lt;br /&gt;
		{&lt;br /&gt;
			$tagsHelper = new JHelperTags;&lt;br /&gt;
			$item-&amp;gt;tags = $tagsHelper-&amp;gt;getTagIds($item-&amp;gt;id, &#039;com_helloworld.helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Load associated items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$item-&amp;gt;associations = array();&lt;br /&gt;
&lt;br /&gt;
			if ($item-&amp;gt;id != null)&lt;br /&gt;
			{&lt;br /&gt;
				$associations = JLanguageAssociations::getAssociations(&#039;com_helloworld&#039;, &#039;#__helloworld&#039;, &#039;com_helloworld.item&#039;, (int)$item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
				foreach ($associations as $tag =&amp;gt; $association)&lt;br /&gt;
				{&lt;br /&gt;
					$item-&amp;gt;associations[$tag] = $association-&amp;gt;id;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $item; &lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.helloworld&#039;,&lt;br /&gt;
			&#039;helloworld&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to preprocess the form to add the association fields dynamically&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return     none&lt;br /&gt;
	 */&lt;br /&gt;
	protected function preprocessForm(JForm $form, $data, $group = &#039;helloworld&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		// Association content items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$languages = JLanguageHelper::getContentLanguages(false, true, null, &#039;ordering&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
			if (count($languages) &amp;gt; 1)&lt;br /&gt;
			{&lt;br /&gt;
				$addform = new SimpleXMLElement(&#039;&amp;lt;form /&amp;gt;&#039;);&lt;br /&gt;
				$fields = $addform-&amp;gt;addChild(&#039;fields&#039;);&lt;br /&gt;
				$fields-&amp;gt;addAttribute(&#039;name&#039;, &#039;associations&#039;);&lt;br /&gt;
				$fieldset = $fields-&amp;gt;addChild(&#039;fieldset&#039;);&lt;br /&gt;
				$fieldset-&amp;gt;addAttribute(&#039;name&#039;, &#039;item_associations&#039;);&lt;br /&gt;
&lt;br /&gt;
				foreach ($languages as $language)&lt;br /&gt;
				{&lt;br /&gt;
					$field = $fieldset-&amp;gt;addChild(&#039;field&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;name&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;type&#039;, &#039;modal_helloworld&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;language&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;label&#039;, $language-&amp;gt;title);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;translate_label&#039;, &#039;false&#039;);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				$form-&amp;gt;load($addform, false);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		parent::preprocessForm($form, $data, $group);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($data))&lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override the JModelAdmin save() function to handle Save as Copy correctly&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   The helloworld record data submitted from the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  parent::save() return value&lt;br /&gt;
	 */&lt;br /&gt;
	public function save($data)&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		JLoader::register(&#039;CategoriesHelper&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_categories/helpers/categories.php&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Validate the category id&lt;br /&gt;
		// validateCategoryId() returns 0 if the catid can&#039;t be found&lt;br /&gt;
		if ((int) $data[&#039;catid&#039;] &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			$data[&#039;catid&#039;] = CategoriesHelper::validateCategoryId($data[&#039;catid&#039;], &#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Alter the greeting and alias for save as copy&lt;br /&gt;
		if ($input-&amp;gt;get(&#039;task&#039;) == &#039;save2copy&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$origTable = clone $this-&amp;gt;getTable();&lt;br /&gt;
			$origTable-&amp;gt;load($input-&amp;gt;getInt(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
			if ($data[&#039;greeting&#039;] == $origTable-&amp;gt;greeting)&lt;br /&gt;
			{&lt;br /&gt;
				list($greeting, $alias) = $this-&amp;gt;generateNewTitle($data[&#039;catid&#039;], $data[&#039;alias&#039;], $data[&#039;greeting&#039;]);&lt;br /&gt;
				$data[&#039;greeting&#039;] = $greeting;&lt;br /&gt;
				$data[&#039;alias&#039;] = $alias;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				if ($data[&#039;alias&#039;] == $origTable-&amp;gt;alias)&lt;br /&gt;
				{&lt;br /&gt;
					$data[&#039;alias&#039;] = &#039;&#039;;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			// standard Joomla practice is to set the new record as unpublished&lt;br /&gt;
			$data[&#039;published&#039;] = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$result = parent::save($data);&lt;br /&gt;
		if ($result)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;getTable()-&amp;gt;rebuild(1);&lt;br /&gt;
		}&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to check if it&#039;s OK to delete a message. Overrides JModelAdmin::canDelete&lt;br /&gt;
	 */&lt;br /&gt;
	protected function canDelete($record)&lt;br /&gt;
	{&lt;br /&gt;
		if( !empty( $record-&amp;gt;id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.delete&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $record-&amp;gt;id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare a helloworld record for saving in the database&lt;br /&gt;
	 */&lt;br /&gt;
	protected function prepareTable($table)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Save the record reordering after a record is dragged to a new position in the helloworlds view&lt;br /&gt;
	 */&lt;br /&gt;
	public function saveorder($idArray = null, $lft_array = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get an instance of the table object.&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
&lt;br /&gt;
		if (!$table-&amp;gt;saveorder($idArray, $lft_array))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;setError($table-&amp;gt;getError());&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Front End Form == &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; Similar to the admin form, we add a tags field to the frontend form, except that we use the nested option and don&#039;t allow the user to define a new tag. We also include a published field with a default value of 1, but just set this to hidden.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;81-88,129&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    addfieldpath=&amp;quot;/administrator/components/com_helloworld/models/fields&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;fields name=&amp;quot;imageinfo&amp;quot; label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_IMAGE_LABEL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;image&amp;quot;&lt;br /&gt;
				type=&amp;quot;file&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_PICTURE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_PICTURE_DESC&amp;quot; &lt;br /&gt;
				accept=&amp;quot;image/*&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
 				name=&amp;quot;caption&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_CAPTION_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;alt&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_ALTTEXT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_ALTTEXT_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fields&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;language&amp;quot;&lt;br /&gt;
				type=&amp;quot;contentlanguage&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;tags&amp;quot; &lt;br /&gt;
				type=&amp;quot;tag&amp;quot;&lt;br /&gt;
				label=&amp;quot;JTAG&amp;quot; &lt;br /&gt;
				description=&amp;quot;JTAG_DESC&amp;quot;&lt;br /&gt;
				mode=&amp;quot;nested&amp;quot;&lt;br /&gt;
				multiple=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;message&amp;quot;&lt;br /&gt;
				type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
				rows=&amp;quot;5&amp;quot;&lt;br /&gt;
				cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
				validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field name=&amp;quot;published&amp;quot; type=&amp;quot;hidden&amp;quot; default=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Frontend Hello World record display == &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
In the view code we get the tag data using the &amp;lt;tt&amp;gt;TagsHelper::getItemTags()&amp;lt;/tt&amp;gt; function. This time we need not only the tag ids, but also other information such as the tag alias and title, in order that the tag link can be constructed correctly in the html.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt; In the layout code we use the standard joomla layout in layouts/joomla/content/tags.php, and in the &amp;lt;tt&amp;gt;render()&amp;lt;/tt&amp;gt; call we pass the tag data which was set up in the view. Note that this layout is designed to be used on the front end only.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;42-43&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;addMap();&lt;br /&gt;
&lt;br /&gt;
		$tagsHelper = new JHelperTags;&lt;br /&gt;
		$this-&amp;gt;item-&amp;gt;tags = $tagsHelper-&amp;gt;getItemTags(&#039;com_helloworld.helloworld&#039; , $this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
		$model = $this-&amp;gt;getModel();&lt;br /&gt;
		$this-&amp;gt;parentItem = $model-&amp;gt;getItem($this-&amp;gt;item-&amp;gt;parent_id);&lt;br /&gt;
		$this-&amp;gt;children = $model-&amp;gt;getChildren($this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
		// getChildren includes the record itself (as well as the children) so remove this record&lt;br /&gt;
		unset($this-&amp;gt;children[0]);&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function addMap() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
&lt;br /&gt;
		// everything&#039;s dependent upon JQuery&lt;br /&gt;
		JHtml::_(&#039;jquery.framework&#039;);&lt;br /&gt;
&lt;br /&gt;
		// we need the Openlayers JS and CSS libraries&lt;br /&gt;
		$document-&amp;gt;addScript(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// ... and our own JS and CSS&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;media/com_helloworld/js/openstreetmap.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(JURI::root() . &amp;quot;media/com_helloworld/css/openstreetmap.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// get the data to pass to our JS code&lt;br /&gt;
		$params = $this-&amp;gt;get(&amp;quot;mapParams&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addScriptOptions(&#039;params&#039;, $params);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;27-28&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;item-&amp;gt;greeting.(($this-&amp;gt;item-&amp;gt;category and $this-&amp;gt;item-&amp;gt;params-&amp;gt;get(&#039;show_category&#039;))&lt;br /&gt;
                                      ? (&#039; (&#039;.$this-&amp;gt;item-&amp;gt;category.&#039;)&#039;) : &#039;&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    echo $this-&amp;gt;item-&amp;gt;description;&lt;br /&gt;
    $tagLayout = new JLayoutFile(&#039;joomla.content.tags&#039;);&lt;br /&gt;
    echo $tagLayout-&amp;gt;render($this-&amp;gt;item-&amp;gt;tags);&lt;br /&gt;
    $src = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;image&#039;];&lt;br /&gt;
    if ($src)&lt;br /&gt;
    {&lt;br /&gt;
        $html = &#039;&amp;lt;figure&amp;gt;&lt;br /&gt;
                    &amp;lt;img src=&amp;quot;%s&amp;quot; alt=&amp;quot;%s&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;figcaption&amp;gt;%s&amp;lt;/figcaption&amp;gt;&lt;br /&gt;
                &amp;lt;/figure&amp;gt;&#039;;&lt;br /&gt;
        $alt = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;alt&#039;];&lt;br /&gt;
        $caption = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;caption&#039;];&lt;br /&gt;
        echo sprintf($html, $src, $alt, $caption);&lt;br /&gt;
    } ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;parentItem-&amp;gt;id &amp;gt; 1) : ?&amp;gt;&lt;br /&gt;
	&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_PARENT&#039;) ?&amp;gt;&lt;br /&gt;
	&amp;lt;/h1&amp;gt;&lt;br /&gt;
	&amp;lt;h3&amp;gt;&lt;br /&gt;
		&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $this-&amp;gt;parentItem-&amp;gt;id . &#039;:&#039; . $this-&amp;gt;parentItem-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $this-&amp;gt;parentItem-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
		&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;parentItem-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
	&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;children) : &lt;br /&gt;
		$baseLevel = $this-&amp;gt;item-&amp;gt;level; ?&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_CHILDREN&#039;) ?&amp;gt;&lt;br /&gt;
		&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;lt;?php foreach ($this-&amp;gt;children as $i =&amp;gt; $child) : ?&amp;gt;&lt;br /&gt;
			&amp;lt;h3&amp;gt;&lt;br /&gt;
				&amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $child-&amp;gt;level - $baseLevel)); ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $child-&amp;gt;id . &#039;:&#039; . $child-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $child-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
				&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $child-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;/h3&amp;gt;&lt;br /&gt;
	&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;map&amp;quot; class=&amp;quot;map&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;map-callout map-callout-bottom&amp;quot; id=&amp;quot;greeting-container&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;searchmap&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo &#039;&amp;lt;input id=&amp;quot;token&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;&#039; . JSession::getFormToken() . &#039;&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;&#039;; ?&amp;gt;&lt;br /&gt;
    &amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;searchHere();&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_SEARCH_HERE_BUTTON&#039;) ?&amp;gt;&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;searchresults&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Site Route Helper == &amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; As mentioned in the Database section above, we add the methods &amp;lt;tt&amp;gt;getHelloworldRoute()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;getCategoryRoute()&amp;lt;/tt&amp;gt; to the site route helper file. This isn&#039;t strictly necessary because if we don&#039;t write these functions Joomla will use a default route helper, but it will be less performant than writing the code ourselves.&amp;lt;/translate&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/helpers/route.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/helpers/route.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;49-101&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Helloworld Component Helper file for generating the URL Routes&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
class HelloworldHelperRoute&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * When the Helloworld message is displayed then there is also shown a map with a Search Here button.&lt;br /&gt;
	 * This function generates the URL which the Ajax call will use to perform the search. &lt;br /&gt;
	 * &lt;br /&gt;
	 */&lt;br /&gt;
	public static function getAjaxURL()&lt;br /&gt;
	{&lt;br /&gt;
		if (!JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			return null;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
		$app  = JFactory::getApplication();&lt;br /&gt;
		$sitemenu= $app-&amp;gt;getMenu();&lt;br /&gt;
		$thismenuitem = $sitemenu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
		// if we haven&#039;t got an active menuitem, or we&#039;re currently on a menuitem &lt;br /&gt;
		// with view=category or note = &amp;quot;Ajax&amp;quot;, then just stay on it&lt;br /&gt;
		if (!$thismenuitem || strpos($thismenuitem-&amp;gt;link, &amp;quot;view=category&amp;quot;) !== false || $thismenuitem-&amp;gt;note == &amp;quot;Ajax&amp;quot;)&lt;br /&gt;
		{&lt;br /&gt;
			return null;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// look for a menuitem with the right language, and a note field of &amp;quot;Ajax&amp;quot;&lt;br /&gt;
		$menuitem = $sitemenu-&amp;gt;getItems(array(&#039;language&#039;,&#039;note&#039;), array($lang, &amp;quot;Ajax&amp;quot;));&lt;br /&gt;
		if ($menuitem)&lt;br /&gt;
		{&lt;br /&gt;
			$itemid = $menuitem[0]-&amp;gt;id; &lt;br /&gt;
			$url = JRoute::_(&amp;quot;index.php?Itemid=$itemid&amp;amp;view=helloworld&amp;amp;format=json&amp;quot;);&lt;br /&gt;
			return $url;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			return null;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Helper function for generating the URL to a Helloworld page&lt;br /&gt;
	 * This is needed for the Tags functionality&lt;br /&gt;
	 */&lt;br /&gt;
	public static function getHelloworldRoute($id, $catid = 0, $language = 0)&lt;br /&gt;
	{&lt;br /&gt;
		// Create the link&lt;br /&gt;
		$link = &#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $id;&lt;br /&gt;
&lt;br /&gt;
		if ((int) $catid &amp;gt; 1)&lt;br /&gt;
		{&lt;br /&gt;
			$link .= &#039;&amp;amp;catid=&#039; . $catid;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if ($language &amp;amp;&amp;amp; $language !== &#039;*&#039; &amp;amp;&amp;amp; JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$link .= &#039;&amp;amp;lang=&#039; . $language;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $link;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Helper function for generating the URL to a Helloworld Category page&lt;br /&gt;
	 * This is needed for the Tags functionality&lt;br /&gt;
	 */&lt;br /&gt;
	public static function getCategoryRoute($catid, $language = 0)&lt;br /&gt;
	{&lt;br /&gt;
		if ($catid instanceof JCategoryNode)&lt;br /&gt;
		{&lt;br /&gt;
			$id = $catid-&amp;gt;id;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$id = (int) $catid;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if ($id &amp;lt; 1)&lt;br /&gt;
		{&lt;br /&gt;
			$link = &#039;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$link = &#039;index.php?option=com_helloworld&amp;amp;view=category&amp;amp;id=&#039; . $id;&lt;br /&gt;
&lt;br /&gt;
			if ($language &amp;amp;&amp;amp; $language !== &#039;*&#039; &amp;amp;&amp;amp; JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$link .= &#039;&amp;amp;lang=&#039; . $language;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $link;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the Component == &amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/router.php|site/router.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/view.json.php|site/views/helloworld/view.json.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/view.html.php|site/views/category/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/tmpl/default.php|site/views/category/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#site/views/category/tmpl/default.xml|site/views/category/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/category.php|site/models/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/filter_category.xml|site/models/forms/filter_category.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Levels#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/helpers/route.php|site/helpers/route.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/category.php|site/helpers/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/helpers/association.php|site/helpers/association.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/associations.php|admin/helpers/associations.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/html/helloworlds.php|admin/helpers/html/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/html/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/sql/updates/mysql/0.0.17.sql|admin/sql/updates/mysql/0.0.17.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#admin/sql/updates/mysql/0.0.18.sql|admin/sql/updates/mysql/0.0.18.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/sql/updates/mysql/0.0.20.sql|admin/sql/updates/mysql/0.0.20.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/updates/mysql/0.0.21.sql|admin/sql/updates/mysql/0.0.21.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Checkout#admin/sql/updates/mysql/0.0.24.sql|admin/sql/updates/mysql/0.0.24.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Ordering#admin/sql/updates/mysql/0.0.25.sql|admin/sql/updates/mysql/0.0.25.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/updates/mysql/0.0.26.sql|admin/sql/updates/mysql/0.0.26.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/sql/updates/mysql/0.0.27.sql|admin/sql/updates/mysql/0.0.27.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/sql/updates/mysql/0.0.28.sql|admin/sql/updates/mysql/0.0.28.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldordering.php|admin/models/fields/helloworldordering.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldparent.php|admin/models/fields/helloworldparent.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/modal/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/models/fields/modal/helloworld.php|admin/models/fields/modal/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworlds/tmpl/modal.php|admin/views/helloworlds/tmpl/modal.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Versioning#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/js/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#media/js/openstreetmap.js|media/js/openstreetmap.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#media/js/admin-helloworlds-modal.js|media/js/admin-helloworlds-modal.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/css/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#index.html|media/css/openstreetmap.css]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.28&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;router.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;js&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;css&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Versioning|&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Prev: Adding Versioning&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Access|&amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt; Next: Adding Access&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Versioning&amp;diff=650681</id>
		<title>J3.x:Developing an MVC Component/Adding Versioning</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Versioning&amp;diff=650681"/>
		<updated>2020-03-20T17:33:16Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: published column added since https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_Levels as we can&amp;#039;t publish items without having our helloworld root record published.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:2--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; In this step we enable our helloworld component to maintain versions of records. As versioning is often associated with documents, we add a text &#039;description&#039; field to our helloworld record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; There are 2 videos accompanying this tutorial step, covering the [https://youtu.be/0TWiH9PVciQ Versioning Overview] and the [https://youtu.be/4W3K5ozsg9w Joomla Observer pattern].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; Versioning Overview&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=0TWiH9PVciQ}}&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; Joomla Observer pattern&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=4W3K5ozsg9w}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; Joomla implements versioning in its core components by using an observer pattern (aka publish / subscribe pattern). The Joomla content history code which handles the storing of record versions subscribes to the &amp;lt;tt&amp;gt;onAfterStore&amp;lt;/tt&amp;gt; events which are triggered whenever the JTable code performs an insert or update operation on a record. When the trigger fires then this content history versioning code runs, and it writes a copy of the data to its own database table (ucm_history). This copy includes a version number, plus the data of the record as a blob of name-value pairs (amongst other information).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; To manage and restore versions there is a Versions button on the record edit form. The Joomla code behind this button runs the com_contenthistory component, which is responsible for displaying the versions stored (by reading the ucm_history records), and enabling the administrator to manage those versions, including initiating a restore of a previous version to be the current record.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt; In order to display the record data appropriately, the com_contenthistory component uses configuration data which it looks to find in the content_types table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; Note that this mechanism doesn&#039;t support keeping old versions to enable a record to be restored if it is deleted accidentally. If you want this in your component, then you should follow the example of Joomla: whenever an admin &amp;quot;deletes&amp;quot; a record it just sets the status of the record to &amp;quot;Trashed&amp;quot;, and the record is only really deleted when the admin &amp;quot;empties the trash&amp;quot;. When the record is physically deleted in the database, the event &amp;lt;tt&amp;gt;onBeforeDelete&amp;lt;/tt&amp;gt; is triggered, and on receiving this the Joomla content history versioning code deletes versions of the record in the ucm history table as well.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; The Joomla documentation page at [[S:MyLanguage/Using Content History in your Component]] gives a list of the aspects required to build version history capability into a component. These aspects are listed below.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; We need to get the Joomla &amp;lt;tt&amp;gt;JTableObserverContenthistory&amp;lt;/tt&amp;gt; code – this is the code which is responsible for writing the versioned copies to the ucm_history table – to handle record updates which occur with our component Helloworld table. We do this by calling a function &amp;lt;tt&amp;gt;JObserverMapper::addObserverClassToClass&amp;lt;/tt&amp;gt; and passing as parameters the observer class  &amp;lt;tt&amp;gt;JTableObserverContenthistory&amp;lt;/tt&amp;gt; and the class to observe – our &amp;lt;tt&amp;gt;HelloWorldTableHelloWorld&amp;lt;/tt&amp;gt; class. Our class inherits from JTable, and JTable publishes the &amp;lt;tt&amp;gt;onAfterStore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;onBeforeDelete&amp;lt;/tt&amp;gt; events which this observer will use to maintain our record versions in the ucm_history table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; We add a Versions button on our edit form. This has standard Joomla code behind it, which results in a modal with an iframe being added to our edit page. When the Versions button is clicked the modal is displayed, and the iframe within it is populated from the com_contenthistory component code, based on the record&#039;s versions available in the ucm_history table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; We provide configuration data (which we insert into the content_types table keyed by a type_alias value of &amp;lt;tt&amp;gt;com_helloworld.helloworld&amp;lt;/tt&amp;gt;) to the content history code for 2 purposes:&amp;lt;/translate&amp;gt; &lt;br /&gt;
#* &amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; to specify under what circumstances a new version should be stored – for example, if a user just clicks on a record to edit it, but then cancels, we wouldn&#039;t want a new version to be created. But as this process involves updating the database record via the checkout process, we have to tell the code to ignore the case where just the checkout fields are changed.&amp;lt;/translate&amp;gt; &lt;br /&gt;
#* &amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; to enable the com_contenthistory code to display the data in the record with sensible labels.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; We add a helloworld configuration parameter which allows the administrator to switch on / off versioning for com_helloworld. The content history versioning code (in &amp;lt;tt&amp;gt;JTableObserverContenthistory&amp;lt;/tt&amp;gt;) looks for a com_helloworld &amp;lt;tt&amp;gt;save_history&amp;lt;/tt&amp;gt; parameter to determine if it should create the record versions for the helloworld component.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt; We add a &amp;lt;tt&amp;gt;typeAlias&amp;lt;/tt&amp;gt; variable to our model. This is just used as a check by Joomla when restoring a version of a helloworld record, ensuring that the typeAlias obtained via the history record matches the value in this &amp;lt;tt&amp;gt;typeAlias&amp;lt;/tt&amp;gt; variable.&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; We add a version note field to our edit form. A value in this field won&#039;t be stored in our helloworld record, but will be stored in the version copy in the ucm_history table, as a label associated with that version.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; We add an editor field to the component. This uses an &amp;lt;tt&amp;gt;editor&amp;lt;/tt&amp;gt; form field type, one of Joomla&#039;s [[standard_form_field_types|standard form field types]] within the admin form, and we output it on the front end as well.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; In addition, we enable version support for helloworld categories. In general the code associated with helloworld categories checks our save_history parameter to determine whether to store versions of categories, and whether to show the Versions button on the edit category form. However, we must also supply the configuration data for categories in the content_types table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Database and Install == &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; We add the description field to the helloworld record, and our configuration data as records in the &amp;lt;tt&amp;gt;content_types&amp;lt;/tt&amp;gt; table. A good explanation of this configuration data is at [[Using Content History in your Component#Add Labels to Pop-Up Windows]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.27.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/updates/mysql/0.0.27.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `description` VARCHAR(4000) NOT NULL DEFAULT &#039;&#039; AFTER `greeting`;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__content_types` (`type_title`, `type_alias`, `content_history_options`) &lt;br /&gt;
VALUES&lt;br /&gt;
(&#039;Helloworld&#039;, &#039;com_helloworld.helloworld&#039;, &lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_helloworld\\/models\\/forms\\/helloworld.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_by&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__helloworld&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;greeting&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;catid&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;),&lt;br /&gt;
(&#039;Helloworld Category&#039;, &#039;com_helloworld.category&#039;,&lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;,&amp;quot;extension&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;modified_user_id&amp;quot;, &amp;quot;modified_time&amp;quot;, &amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;version&amp;quot;, &amp;quot;hits&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[&amp;quot;publish_up&amp;quot;, &amp;quot;publish_down&amp;quot;], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;access&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__viewlevels&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;modified_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;11,38-58&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out` INT(10) NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out_time` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`description` VARCHAR(4000) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`alias`  VARCHAR(40)  NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`language`  CHAR(7)  NOT NULL DEFAULT &#039;*&#039;,&lt;br /&gt;
	`parent_id`	int(10)    NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`level`	int(10)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`path`	VARCHAR(400)    NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`lft`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`rgt`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`image`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`latitude` DECIMAL(9,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	`longitude` DECIMAL(10,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
CREATE UNIQUE INDEX `aliasindex` ON `#__helloworld` (`alias`, `catid`);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`,`alias`,`language`, `parent_id`, `level`, `path`, `lft`, `rgt`, `published`) VALUES&lt;br /&gt;
(&#039;helloworld root&#039;,&#039;helloworld-root-alias&#039;,&#039;en-GB&#039;, 0, 0, &#039;&#039;, 0, 5, 1),&lt;br /&gt;
(&#039;Hello World!&#039;,&#039;hello-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;hello-world&#039;, 1, 2, 0),&lt;br /&gt;
(&#039;Goodbye World!&#039;,&#039;goodbye-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;goodbye-world&#039;, 3, 4, 0);&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__content_types` (`type_title`, `type_alias`, `content_history_options`) &lt;br /&gt;
VALUES&lt;br /&gt;
(&#039;Helloworld&#039;, &#039;com_helloworld.helloworld&#039;, &lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_helloworld\\/models\\/forms\\/helloworld.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_by&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__helloworld&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;greeting&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;catid&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;),&lt;br /&gt;
(&#039;Helloworld Category&#039;, &#039;com_helloworld.category&#039;,&lt;br /&gt;
&#039;{&amp;quot;formFile&amp;quot;:&amp;quot;administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml&amp;quot;, &lt;br /&gt;
&amp;quot;hideFields&amp;quot;:[&amp;quot;asset_id&amp;quot;,&amp;quot;checked_out&amp;quot;,&amp;quot;checked_out_time&amp;quot;,&amp;quot;version&amp;quot;,&amp;quot;lft&amp;quot;,&amp;quot;rgt&amp;quot;,&amp;quot;level&amp;quot;,&amp;quot;path&amp;quot;,&amp;quot;extension&amp;quot;], &lt;br /&gt;
&amp;quot;ignoreChanges&amp;quot;:[&amp;quot;modified_user_id&amp;quot;, &amp;quot;modified_time&amp;quot;, &amp;quot;checked_out&amp;quot;, &amp;quot;checked_out_time&amp;quot;, &amp;quot;version&amp;quot;, &amp;quot;hits&amp;quot;, &amp;quot;path&amp;quot;],&lt;br /&gt;
&amp;quot;convertToInt&amp;quot;:[&amp;quot;publish_up&amp;quot;, &amp;quot;publish_down&amp;quot;], &lt;br /&gt;
&amp;quot;displayLookup&amp;quot;:[&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;created_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;access&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__viewlevels&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;modified_user_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__users&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;name&amp;quot;},&lt;br /&gt;
{&amp;quot;sourceColumn&amp;quot;:&amp;quot;parent_id&amp;quot;,&amp;quot;targetTable&amp;quot;:&amp;quot;#__categories&amp;quot;,&amp;quot;targetColumn&amp;quot;:&amp;quot;id&amp;quot;,&amp;quot;displayColumn&amp;quot;:&amp;quot;title&amp;quot;}]}&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; If the helloworld component is uninstalled then we should remove the configuration records from the content_types table and remove helloworld record versions from the ucm_history table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/uninstall.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/uninstall.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;2-4&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
DELETE FROM `#__ucm_history` WHERE ucm_type_id in &lt;br /&gt;
	(select type_id from `#__content_types` where type_alias in (&#039;com_helloworld.helloworld&#039;,&#039;com_helloworld.category&#039;));&lt;br /&gt;
DELETE FROM `#__content_types` WHERE type_alias in (&#039;com_helloworld.helloworld&#039;,&#039;com_helloworld.category&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt; In the previous step we used the install script to modify the helloworld records in the database. We don&#039;t want that to recur this step, so we revert the install script to its basic form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;script.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;script.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;92-93&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Script file of HelloWorld component.&lt;br /&gt;
 *&lt;br /&gt;
 * The name of this class is dependent on the component being installed.&lt;br /&gt;
 * The class name should have the component&#039;s name, directly followed by&lt;br /&gt;
 * the text InstallerScript (ex:. com_helloWorldInstallerScript).&lt;br /&gt;
 *&lt;br /&gt;
 * This class will be called by Joomla!&#039;s installer, if specified in your component&#039;s&lt;br /&gt;
 * manifest file, and is used for custom automation actions in its installation process.&lt;br /&gt;
 *&lt;br /&gt;
 * In order to use this automation script, you should reference it in your component&#039;s&lt;br /&gt;
 * manifest file as follows:&lt;br /&gt;
 * &amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
class com_helloWorldInstallerScript&lt;br /&gt;
{&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is installed.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling this method.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function install($parent) &lt;br /&gt;
    {&lt;br /&gt;
        $parent-&amp;gt;getParent()-&amp;gt;setRedirectURL(&#039;index.php?option=com_helloworld&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is uninstalled.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling this method.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function uninstall($parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_UNINSTALL_TEXT&#039;) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is updated.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function update($parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::sprintf(&#039;COM_HELLOWORLD_UPDATE_TEXT&#039;, $parent-&amp;gt;get(&#039;manifest&#039;)-&amp;gt;version) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs just before any installation action is preformed on the component.&lt;br /&gt;
     * Verifications and pre-requisites should run in this function.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  string    $type   - Type of PreFlight action. Possible values are:&lt;br /&gt;
     *                           - * install&lt;br /&gt;
     *                           - * update&lt;br /&gt;
     *                           - * discover_install&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function preflight($type, $parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_PREFLIGHT_&#039; . $type . &#039;_TEXT&#039;) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs right after any installation action is preformed on the component.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  string    $type   - Type of PostFlight action. Possible values are:&lt;br /&gt;
     *                           - * install&lt;br /&gt;
     *                           - * update&lt;br /&gt;
     *                           - * discover_install&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    function postflight($type, $parent) &lt;br /&gt;
    {&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Setup Content History Observer == &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt; We need to tell the Content History code to observe our helloworld table class, and the most logical place to put this code is in our table constructor.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/tables/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;26&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTableNested&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   JDatabaseDriver  &amp;amp;$db  A database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db)&lt;br /&gt;
	{&lt;br /&gt;
		JObserverMapper::addObserverClassToClass(&#039;JTableObserverContenthistory&#039;, &#039;HelloWorldTableHelloWorld&#039;, array(&#039;typeAlias&#039; =&amp;gt; &#039;com_helloworld.helloworld&#039;));&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
        if (isset($array[&#039;imageinfo&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;imageinfo&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the imageinfo array to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;imageinfo&#039;]);&lt;br /&gt;
			$array[&#039;image&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
        // Bind the rules.&lt;br /&gt;
		if (isset($array[&#039;rules&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;rules&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$rules = new JAccessRules($array[&#039;rules&#039;]);&lt;br /&gt;
			$this-&amp;gt;setRules($rules);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		if (isset($array[&#039;parent_id&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			if (!isset($array[&#039;id&#039;]) || $array[&#039;id&#039;] == 0)&lt;br /&gt;
			{   // new record&lt;br /&gt;
				$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
			}&lt;br /&gt;
			elseif (isset($array[&#039;helloworldordering&#039;]))&lt;br /&gt;
			{&lt;br /&gt;
				// when saving a record load() is called before bind() so the table instance will have properties which are the existing field values&lt;br /&gt;
				if ($this-&amp;gt;parent_id == $array[&#039;parent_id&#039;])&lt;br /&gt;
				{&lt;br /&gt;
					// If first is chosen make the item the first child of the selected parent.&lt;br /&gt;
					if ($array[&#039;helloworldordering&#039;] == -1)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;first-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// If last is chosen make it the last child of the selected parent.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] == -2)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Don&#039;t try to put an item after itself. All other ones put after the selected item.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id != $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;helloworldordering&#039;], &#039;after&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Just leave it where it is if no change is made.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id == $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						unset($array[&#039;helloworldordering&#039;]);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				// Set the new parent id if parent id not matched and put in last position&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.helloworld.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the asset-parent-id of the item&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId(JTable $table = NULL, $id = NULL)&lt;br /&gt;
	{&lt;br /&gt;
		// We will retrieve the parent-asset from the Asset-table&lt;br /&gt;
		$assetParent = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		// Default: if no asset-parent can be found we take the global asset&lt;br /&gt;
		$assetParentId = $assetParent-&amp;gt;getRootId();&lt;br /&gt;
&lt;br /&gt;
		// Find the parent-asset&lt;br /&gt;
		if (($this-&amp;gt;catid)&amp;amp;&amp;amp; !empty($this-&amp;gt;catid))&lt;br /&gt;
		{&lt;br /&gt;
			// The item has a category as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld.category.&#039; . (int) $this-&amp;gt;catid);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// The item has the component as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Return the found asset-parent-id&lt;br /&gt;
		if ($assetParent-&amp;gt;id)&lt;br /&gt;
		{&lt;br /&gt;
			$assetParentId=$assetParent-&amp;gt;id;&lt;br /&gt;
		}&lt;br /&gt;
		return $assetParentId;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function check()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;alias = trim($this-&amp;gt;alias);&lt;br /&gt;
		if (empty($this-&amp;gt;alias))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;alias = $this-&amp;gt;greeting;&lt;br /&gt;
		}&lt;br /&gt;
		$this-&amp;gt;alias = JFilterOutput::stringURLSafe($this-&amp;gt;alias);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function delete($pk = null, $children = false)&lt;br /&gt;
	{&lt;br /&gt;
		return parent::delete($pk, $children);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Add Versions button to the Edit View == &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; We check that our &amp;lt;tt&amp;gt;save_history&amp;lt;/tt&amp;gt; config parameter is set to true before we display the Versions button.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;109-114&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * View form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @var         form&lt;br /&gt;
	 */&lt;br /&gt;
	protected $form = null;&lt;br /&gt;
    protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the Data&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		$this-&amp;gt;item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
        $this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;);&lt;br /&gt;
&lt;br /&gt;
        // What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;, &#039;helloworld&#039;, $this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
        &lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		// Hide Joomla Administrator Main menu&lt;br /&gt;
		$input-&amp;gt;set(&#039;hidemainmenu&#039;, true);&lt;br /&gt;
&lt;br /&gt;
		$isNew = ($this-&amp;gt;item-&amp;gt;id == 0);&lt;br /&gt;
		&lt;br /&gt;
		JToolBarHelper::title($isNew ? JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW&#039;)&lt;br /&gt;
		                             : JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT&#039;), &#039;helloworld&#039;);&lt;br /&gt;
		// Build the actions for new and existing records.&lt;br /&gt;
		if ($isNew)&lt;br /&gt;
		{&lt;br /&gt;
			// For new records, check the create permission.&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CANCEL&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;))&lt;br /&gt;
			{&lt;br /&gt;
				// We can save the new record&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
 &lt;br /&gt;
				// We can save this record, but check the create permission to see&lt;br /&gt;
				// if we can return to make a new one.&lt;br /&gt;
				if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
				{&lt;br /&gt;
					JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
					                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
				}&lt;br /&gt;
				$config = JFactory::getConfig();&lt;br /&gt;
				$save_history = $config-&amp;gt;get(&#039;save_history&#039;, true);&lt;br /&gt;
				if ($save_history) &lt;br /&gt;
				{&lt;br /&gt;
					JToolbarHelper::versions(&#039;com_helloworld.helloworld&#039;, $this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2copy&#039;, &#039;save-copy.png&#039;, &#039;save-copy_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AS_COPY&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CLOSE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$isNew = ($this-&amp;gt;item-&amp;gt;id &amp;lt; 1);&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle($isNew ? JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;) :&lt;br /&gt;
                JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_EDITING&#039;));&lt;br /&gt;
        $document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Add Configuration Parameters == &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; We add the &amp;lt;tt&amp;gt;save_history&amp;lt;/tt&amp;gt; parameter together with a history_limit parameter which specifies the number of versions to keep.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;38-59&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			type=&amp;quot;plugins&amp;quot;&lt;br /&gt;
            folder=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
			filter=&amp;quot;cmd&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
            &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_USE_DEFAULT&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_DO_NOT_USE&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;user_to_email&amp;quot;&lt;br /&gt;
			type=&amp;quot;user&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;save_history&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			class=&amp;quot;btn-group btn-group-yesno&amp;quot;&lt;br /&gt;
			default=&amp;quot;1&amp;quot;&lt;br /&gt;
			label=&amp;quot;JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;JGLOBAL_SAVE_HISTORY_OPTIONS_DESC&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option&lt;br /&gt;
				value=&amp;quot;0&amp;quot;&amp;gt;JNO&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option&lt;br /&gt;
				value=&amp;quot;1&amp;quot;&amp;gt;JYES&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;history_limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			filter=&amp;quot;integer&amp;quot;&lt;br /&gt;
			label=&amp;quot;JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;5&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Add typeAlias to the Model == &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;25-26&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
    // JModelAdmin needs to know this for storing the associations &lt;br /&gt;
	protected $associationsContext = &#039;com_helloworld.item&#039;;&lt;br /&gt;
    &lt;br /&gt;
	// Contenthistory needs to know this for restoring previous versions&lt;br /&gt;
	public $typeAlias = &#039;com_helloworld.helloworld&#039;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override getItem to allow us to convert the JSON-encoded image information&lt;br /&gt;
	 * in the database record into an array for subsequent prefilling of the edit form&lt;br /&gt;
     * We also use this method to prefill the associations&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($pk = null)&lt;br /&gt;
	{&lt;br /&gt;
		$item = parent::getItem($pk);&lt;br /&gt;
		if ($item AND property_exists($item, &#039;image&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			$registry = new Registry($item-&amp;gt;image);&lt;br /&gt;
			$item-&amp;gt;imageinfo = $registry-&amp;gt;toArray();&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
        // Load associated items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$item-&amp;gt;associations = array();&lt;br /&gt;
&lt;br /&gt;
			if ($item-&amp;gt;id != null)&lt;br /&gt;
			{&lt;br /&gt;
				$associations = JLanguageAssociations::getAssociations(&#039;com_helloworld&#039;, &#039;#__helloworld&#039;, &#039;com_helloworld.item&#039;, (int)$item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
				foreach ($associations as $tag =&amp;gt; $association)&lt;br /&gt;
				{&lt;br /&gt;
					$item-&amp;gt;associations[$tag] = $association-&amp;gt;id;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $item; &lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.helloworld&#039;,&lt;br /&gt;
			&#039;helloworld&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to preprocess the form to add the association fields dynamically&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return     none&lt;br /&gt;
	 */&lt;br /&gt;
	protected function preprocessForm(JForm $form, $data, $group = &#039;helloworld&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		// Association content items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$languages = JLanguageHelper::getContentLanguages(false, true, null, &#039;ordering&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
			if (count($languages) &amp;gt; 1)&lt;br /&gt;
			{&lt;br /&gt;
				$addform = new SimpleXMLElement(&#039;&amp;lt;form /&amp;gt;&#039;);&lt;br /&gt;
				$fields = $addform-&amp;gt;addChild(&#039;fields&#039;);&lt;br /&gt;
				$fields-&amp;gt;addAttribute(&#039;name&#039;, &#039;associations&#039;);&lt;br /&gt;
				$fieldset = $fields-&amp;gt;addChild(&#039;fieldset&#039;);&lt;br /&gt;
				$fieldset-&amp;gt;addAttribute(&#039;name&#039;, &#039;item_associations&#039;);&lt;br /&gt;
&lt;br /&gt;
				foreach ($languages as $language)&lt;br /&gt;
				{&lt;br /&gt;
					$field = $fieldset-&amp;gt;addChild(&#039;field&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;name&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;type&#039;, &#039;modal_helloworld&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;language&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;label&#039;, $language-&amp;gt;title);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;translate_label&#039;, &#039;false&#039;);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				$form-&amp;gt;load($addform, false);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		parent::preprocessForm($form, $data, $group);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($data))&lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override the JModelAdmin save() function to handle Save as Copy correctly&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   The helloworld record data submitted from the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  parent::save() return value&lt;br /&gt;
	 */&lt;br /&gt;
	public function save($data)&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		JLoader::register(&#039;CategoriesHelper&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_categories/helpers/categories.php&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Validate the category id&lt;br /&gt;
		// validateCategoryId() returns 0 if the catid can&#039;t be found&lt;br /&gt;
		if ((int) $data[&#039;catid&#039;] &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			$data[&#039;catid&#039;] = CategoriesHelper::validateCategoryId($data[&#039;catid&#039;], &#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Alter the greeting and alias for save as copy&lt;br /&gt;
		if ($input-&amp;gt;get(&#039;task&#039;) == &#039;save2copy&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$origTable = clone $this-&amp;gt;getTable();&lt;br /&gt;
			$origTable-&amp;gt;load($input-&amp;gt;getInt(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
			if ($data[&#039;greeting&#039;] == $origTable-&amp;gt;greeting)&lt;br /&gt;
			{&lt;br /&gt;
				list($greeting, $alias) = $this-&amp;gt;generateNewTitle($data[&#039;catid&#039;], $data[&#039;alias&#039;], $data[&#039;greeting&#039;]);&lt;br /&gt;
				$data[&#039;greeting&#039;] = $greeting;&lt;br /&gt;
				$data[&#039;alias&#039;] = $alias;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				if ($data[&#039;alias&#039;] == $origTable-&amp;gt;alias)&lt;br /&gt;
				{&lt;br /&gt;
					$data[&#039;alias&#039;] = &#039;&#039;;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			// standard Joomla practice is to set the new record as unpublished&lt;br /&gt;
			$data[&#039;published&#039;] = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$result = parent::save($data);&lt;br /&gt;
		if ($result)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;getTable()-&amp;gt;rebuild(1);&lt;br /&gt;
		}&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to check if it&#039;s OK to delete a message. Overrides JModelAdmin::canDelete&lt;br /&gt;
	 */&lt;br /&gt;
	protected function canDelete($record)&lt;br /&gt;
	{&lt;br /&gt;
		if( !empty( $record-&amp;gt;id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.delete&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $record-&amp;gt;id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare a helloworld record for saving in the database&lt;br /&gt;
	 */&lt;br /&gt;
	protected function prepareTable($table)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Save the record reordering after a record is dragged to a new position in the helloworlds view&lt;br /&gt;
	 */&lt;br /&gt;
	public function saveorder($idArray = null, $lft_array = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get an instance of the table object.&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
&lt;br /&gt;
		if (!$table-&amp;gt;saveorder($idArray, $lft_array))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;setError($table-&amp;gt;getError());&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Add Version Note and Description fields == &amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; We need to add these to our edit form xml definition and Joomla expects the version note field to be called &amp;quot;version_note&amp;quot;. We put the version_note field within the &amp;quot;details&amp;quot; fieldset so that it will be output in the layout with the other fields in the &amp;lt;tt&amp;gt;renderFieldset(&#039;details&#039;)&amp;lt;/tt&amp;gt; call. The description field we&#039;ll place separately on the right hand side of the page on the admin form, and we&#039;ll add it on the front end as well.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;90-97,99-105&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
				addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
                &amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox validate-greeting&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;latitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-90.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;90.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;longitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-180.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;180.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field  &lt;br /&gt;
                name=&amp;quot;language&amp;quot; &lt;br /&gt;
        		type=&amp;quot;contentlanguage&amp;quot; &lt;br /&gt;
                label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_ORDERING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ORDERING_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&lt;br /&gt;
				size=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;version_note&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELD_VERSION_NOTE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JGLOBAL_FIELD_VERSION_NOTE_DESC&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot; &lt;br /&gt;
				size=&amp;quot;45&amp;quot;&lt;br /&gt;
				labelclass=&amp;quot;control-label&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
		&amp;lt;field 	name=&amp;quot;description&amp;quot; &lt;br /&gt;
				type=&amp;quot;editor&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_LABEL&amp;quot; &lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;JComponentHelper::filterText&amp;quot; &lt;br /&gt;
				buttons=&amp;quot;true&amp;quot; &lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;imageinfo&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;image-info&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_IMAGE_FIELDS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
                name=&amp;quot;image&amp;quot;&lt;br /&gt;
                type=&amp;quot;media&amp;quot;&lt;br /&gt;
                preview=&amp;quot;tooltip&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;field name=&amp;quot;alt&amp;quot;&lt;br /&gt;
                type=&amp;quot;text&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC&amp;quot;&lt;br /&gt;
                size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;field name=&amp;quot;caption&amp;quot;&lt;br /&gt;
                type=&amp;quot;text&amp;quot;&lt;br /&gt;
                label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
                description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC&amp;quot;&lt;br /&gt;
                size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;params&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELDSET_DISPLAY_OPTIONS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
					type=&amp;quot;list&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
					default=&amp;quot;&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_USE_GLOBAL&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;accesscontrol&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FIELDSET_RULES&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;asset_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				filter=&amp;quot;unset&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;rules&amp;quot;&lt;br /&gt;
				type=&amp;quot;rules&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_FIELD_RULES_LABEL&amp;quot;&lt;br /&gt;
				filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
				validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				section=&amp;quot;message&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworld/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;45,48-50&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
// The following is to enable setting the permission&#039;s Calculated Setting &lt;br /&gt;
// when you change the permission&#039;s Setting. &lt;br /&gt;
// The core javascript code for initiating the Ajax request looks for a field&lt;br /&gt;
// with id=&amp;quot;jform_title&amp;quot; and sets its value as the &#039;title&#039; parameter to send in the Ajax request&lt;br /&gt;
JFactory::getDocument()-&amp;gt;addScriptDeclaration(&#039;&lt;br /&gt;
	jQuery(document).ready(function() {&lt;br /&gt;
        greeting = jQuery(&amp;quot;#jform_greeting&amp;quot;).val();&lt;br /&gt;
		jQuery(&amp;quot;#jform_title&amp;quot;).val(greeting);&lt;br /&gt;
	});&lt;br /&gt;
&#039;);&lt;br /&gt;
&lt;br /&gt;
// Required for proper display of fields generated by com_associations&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
// if &amp;amp;tmpl=component used on first invocation, ensure it&#039;s on subsequent ones too&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$tmpl = $input-&amp;gt;getCmd(&#039;tmpl&#039;, &#039;&#039;) === &#039;component&#039; ? &#039;&amp;amp;tmpl=component&#039; : &#039;&#039;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;layout=edit&#039; . $tmpl . &#039;&amp;amp;id=&#039; . (int) $this-&amp;gt;item-&amp;gt;id); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;input id=&amp;quot;jform_title&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;helloworld-message-title&amp;quot;/&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.startTabSet&#039;, &#039;myTab&#039;, array(&#039;active&#039; =&amp;gt; &#039;details&#039;)); ?&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;details&#039;, &lt;br /&gt;
        empty($this-&amp;gt;item-&amp;gt;id) ? JText::_(&#039;COM_HELLOWORLD_TAB_NEW_MESSAGE&#039;) : JText::_(&#039;COM_HELLOWORLD_TAB_EDIT_MESSAGE&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span3&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span9&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getInput(&#039;description&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;image&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_IMAGE&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_IMAGE&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;image-info&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;params&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_PARAMS&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_PARAMS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;params&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php if (JLanguageAssociations::isEnabled()) : ?&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;associations&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_ASSOCIATIONS&#039;)); ?&amp;gt;&lt;br /&gt;
            &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_ASSOCIATIONS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;span12&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo JLayoutHelper::render(&#039;joomla.edit.associations&#039;, $this);  ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;permissions&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_PERMISSIONS&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_PERMISSIONS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span12&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;accesscontrol&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTabSet&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;helloworld.edit&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
Include the description field in the query within the model.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;79&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
JLoader::register(&#039;HelloworldHelperRoute&#039;, JPATH_ROOT . &#039;/components/com_helloworld/helpers/route.php&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var object item&lt;br /&gt;
	 */&lt;br /&gt;
	protected $item;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to auto-populate the model state.&lt;br /&gt;
	 *&lt;br /&gt;
	 * This method should only be called once per instantiation and is designed&lt;br /&gt;
	 * to be called on the first call to the getState() method unless the model&lt;br /&gt;
	 * configuration flag to ignore the request is set.&lt;br /&gt;
	 *&lt;br /&gt;
	 * Note. Calling getState in this method will result in recursion.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	void&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function populateState()&lt;br /&gt;
	{&lt;br /&gt;
		// Get the message id&lt;br /&gt;
		$jinput = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
		$id     = $jinput-&amp;gt;get(&#039;id&#039;, 1, &#039;INT&#039;);&lt;br /&gt;
		$this-&amp;gt;setState(&#039;message.id&#039;, $id);&lt;br /&gt;
&lt;br /&gt;
		// Load the parameters.&lt;br /&gt;
		$this-&amp;gt;setState(&#039;params&#039;, JFactory::getApplication()-&amp;gt;getParams());&lt;br /&gt;
		parent::populateState();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
	 * @return object The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($id = null)&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;item) || !is_null($id)) &lt;br /&gt;
		{&lt;br /&gt;
			$id    = is_null($id) ? $this-&amp;gt;getState(&#039;message.id&#039;) : $id;&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.greeting, h.params, h.image as image, c.title as category, h.latitude as latitude, h.longitude as longitude,&lt;br /&gt;
						h.id as id, h.alias as alias, h.catid as catid, h.parent_id as parent_id, h.level as level, h.description as description&#039;)&lt;br /&gt;
				  -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
				  -&amp;gt;leftJoin(&#039;#__categories as c ON h.catid=c.id&#039;)&lt;br /&gt;
				  -&amp;gt;where(&#039;h.id=&#039; . (int)$id);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery((string)$query);&lt;br /&gt;
		&lt;br /&gt;
			if ($this-&amp;gt;item = $db-&amp;gt;loadObject()) &lt;br /&gt;
			{&lt;br /&gt;
				// Load the JSON string&lt;br /&gt;
				$params = new JRegistry;&lt;br /&gt;
				$params-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;params, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Merge global params with item params&lt;br /&gt;
				$params = clone $this-&amp;gt;getState(&#039;params&#039;);&lt;br /&gt;
				$params-&amp;gt;merge($this-&amp;gt;item-&amp;gt;params);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Convert the JSON-encoded image info into an array&lt;br /&gt;
				$image = new JRegistry;&lt;br /&gt;
				$image-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;image, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;imageDetails = $image;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				throw new Exception(&#039;Helloworld id not found&#039;, 404);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;item;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapParams()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;item) &lt;br /&gt;
		{&lt;br /&gt;
			$url = HelloworldHelperRoute::getAjaxURL();&lt;br /&gt;
			$this-&amp;gt;mapParams = array(&lt;br /&gt;
				&#039;latitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;latitude,&lt;br /&gt;
				&#039;longitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;longitude,&lt;br /&gt;
				&#039;zoom&#039; =&amp;gt; 10,&lt;br /&gt;
				&#039;greeting&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;greeting,&lt;br /&gt;
				&#039;ajaxurl&#039; =&amp;gt; $url&lt;br /&gt;
			);&lt;br /&gt;
			return $this-&amp;gt;mapParams; &lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(&#039;No helloworld details available for map&#039;, 500);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapSearchResults($mapbounds)&lt;br /&gt;
	{&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.id, h.alias, h.catid, h.greeting, h.latitude, h.longitude&#039;)&lt;br /&gt;
			   -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
			   -&amp;gt;where(&#039;h.latitude &amp;gt; &#039; . $mapbounds[&#039;minlat&#039;] . &lt;br /&gt;
				&#039; AND h.latitude &amp;lt; &#039; . $mapbounds[&#039;maxlat&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;gt; &#039; . $mapbounds[&#039;minlng&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;lt; &#039; . $mapbounds[&#039;maxlng&#039;]);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$results = $db-&amp;gt;loadObjectList(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			$msg = $e-&amp;gt;getMessage();&lt;br /&gt;
			JFactory::getApplication()-&amp;gt;enqueueMessage($msg, &#039;error&#039;); &lt;br /&gt;
			$results = null;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		for ($i = 0; $i &amp;lt; count($results); $i++) &lt;br /&gt;
		{&lt;br /&gt;
			$results[$i]-&amp;gt;url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $results[$i]-&amp;gt;id . &lt;br /&gt;
				&amp;quot;:&amp;quot; . $results[$i]-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $results[$i]-&amp;gt;catid . $query_lang);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $results; &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getChildren($id)&lt;br /&gt;
	{&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
		$children = $table-&amp;gt;getTree($id);&lt;br /&gt;
		return $children;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; Output the description field in the layout.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;26&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;item-&amp;gt;greeting.(($this-&amp;gt;item-&amp;gt;category and $this-&amp;gt;item-&amp;gt;params-&amp;gt;get(&#039;show_category&#039;))&lt;br /&gt;
                                      ? (&#039; (&#039;.$this-&amp;gt;item-&amp;gt;category.&#039;)&#039;) : &#039;&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    echo $this-&amp;gt;item-&amp;gt;description;&lt;br /&gt;
    $src = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;image&#039;];&lt;br /&gt;
    if ($src)&lt;br /&gt;
    {&lt;br /&gt;
        $html = &#039;&amp;lt;figure&amp;gt;&lt;br /&gt;
                    &amp;lt;img src=&amp;quot;%s&amp;quot; alt=&amp;quot;%s&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;figcaption&amp;gt;%s&amp;lt;/figcaption&amp;gt;&lt;br /&gt;
                &amp;lt;/figure&amp;gt;&#039;;&lt;br /&gt;
        $alt = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;alt&#039;];&lt;br /&gt;
        $caption = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;caption&#039;];&lt;br /&gt;
        echo sprintf($html, $src, $alt, $caption);&lt;br /&gt;
    } ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;parentItem-&amp;gt;id &amp;gt; 1) : ?&amp;gt;&lt;br /&gt;
	&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_PARENT&#039;) ?&amp;gt;&lt;br /&gt;
	&amp;lt;/h1&amp;gt;&lt;br /&gt;
	&amp;lt;h3&amp;gt;&lt;br /&gt;
		&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $this-&amp;gt;parentItem-&amp;gt;id . &#039;:&#039; . $this-&amp;gt;parentItem-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $this-&amp;gt;parentItem-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
		&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;parentItem-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
	&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;children) : &lt;br /&gt;
		$baseLevel = $this-&amp;gt;item-&amp;gt;level; ?&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_CHILDREN&#039;) ?&amp;gt;&lt;br /&gt;
		&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;lt;?php foreach ($this-&amp;gt;children as $i =&amp;gt; $child) : ?&amp;gt;&lt;br /&gt;
			&amp;lt;h3&amp;gt;&lt;br /&gt;
				&amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $child-&amp;gt;level - $baseLevel)); ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $child-&amp;gt;id . &#039;:&#039; . $child-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $child-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
				&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $child-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;/h3&amp;gt;&lt;br /&gt;
	&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;map&amp;quot; class=&amp;quot;map&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;map-callout map-callout-bottom&amp;quot; id=&amp;quot;greeting-container&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;searchmap&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo &#039;&amp;lt;input id=&amp;quot;token&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;&#039; . JSession::getFormToken() . &#039;&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;&#039;; ?&amp;gt;&lt;br /&gt;
    &amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;searchHere();&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_SEARCH_HERE_BUTTON&#039;) ?&amp;gt;&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;searchresults&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Updated Language Strings == &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;28-29&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE=&amp;quot;Language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_POSITION=&amp;quot;Position&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_DESC=&amp;quot;Message description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_LABEL=&amp;quot;Description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL=&amp;quot;Latitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC=&amp;quot;Enter the position latitude, between -90 and +90 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL=&amp;quot;Longitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC=&amp;quot;Enter the position longitude, between -180 and +180 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the parent record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_FIRST=&amp;quot;-- First record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_LAST=&amp;quot;-- Last record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_TEXT=&amp;quot;Ordering will be available after saving.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC=&amp;quot;Select the appropriate language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_IMAGE_FIELDS=&amp;quot;Image details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL=&amp;quot;Select image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC=&amp;quot;Select an image from the library, or upload a new one&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC=&amp;quot;Alternative text (if image cannot be displayed)&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC=&amp;quot;Provide a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_ASSOCIATIONS=&amp;quot;Message Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_IMAGE=&amp;quot;Image info&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_ASC=&amp;quot;Language ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_DESC=&amp;quot;Language descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_ASC=&amp;quot;Association ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_DESC=&amp;quot;Association descending&amp;quot;&lt;br /&gt;
; Helloworld menuitem - selecting a greeting via modal&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_MODAL_TITLE=&amp;quot;Select greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD=&amp;quot;Select&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_BUTTON_TOOLTIP=&amp;quot;Select a helloworld greeting&amp;quot;&lt;br /&gt;
; Checking in records&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_0=&amp;quot;No records checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_1=&amp;quot;%d record successfully checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_MORE=&amp;quot;%d records successfully checked in.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the Component == &amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/router.php|site/router.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/view.json.php|site/views/helloworld/view.json.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/view.html.php|site/views/category/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/tmpl/default.php|site/views/category/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#site/views/category/tmpl/default.xml|site/views/category/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/category.php|site/models/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/filter_category.xml|site/models/forms/filter_category.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Levels#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/route.php|site/helpers/route.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/category.php|site/helpers/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/helpers/association.php|site/helpers/association.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/associations.php|admin/helpers/associations.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/html/helloworlds.php|admin/helpers/html/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/html/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/sql/updates/mysql/0.0.17.sql|admin/sql/updates/mysql/0.0.17.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#admin/sql/updates/mysql/0.0.18.sql|admin/sql/updates/mysql/0.0.18.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/sql/updates/mysql/0.0.20.sql|admin/sql/updates/mysql/0.0.20.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/updates/mysql/0.0.21.sql|admin/sql/updates/mysql/0.0.21.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Checkout#admin/sql/updates/mysql/0.0.24.sql|admin/sql/updates/mysql/0.0.24.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Ordering#admin/sql/updates/mysql/0.0.25.sql|admin/sql/updates/mysql/0.0.25.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/updates/mysql/0.0.26.sql|admin/sql/updates/mysql/0.0.26.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/sql/updates/mysql/0.0.27.sql|admin/sql/updates/mysql/0.0.27.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldordering.php|admin/models/fields/helloworldordering.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldparent.php|admin/models/fields/helloworldparent.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/modal/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/models/fields/modal/helloworld.php|admin/models/fields/modal/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworlds/tmpl/modal.php|admin/views/helloworlds/tmpl/modal.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Versioning#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/js/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#media/js/openstreetmap.js|media/js/openstreetmap.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#media/js/admin-helloworlds-modal.js|media/js/admin-helloworlds-modal.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/css/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#index.html|media/css/openstreetmap.css]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.27&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;router.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;js&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;css&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Levels|&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; Prev: Adding Levels&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Tags|&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; Next: Adding Tags&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Levels&amp;diff=650680</id>
		<title>J3.x:Developing an MVC Component/Adding Levels</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_Levels&amp;diff=650680"/>
		<updated>2020-03-20T17:31:14Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: published column added as we can&amp;#039;t publish items without having our helloworld root record published.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:2--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; In this step we add levels to our helloworld component, which basically means that we&#039;re implementing a tree structure on our helloworld records.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; You can view an accompanying video at [https://youtu.be/vpchQZFQlso Adding levels].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=vpchQZFQlso}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; Joomla implements menuitems and categories as tree structures. This means, for example, that menuitems on a menu can have submenus off them (as can be seen on the Joomla admin menu) and those submenuitems can in turn have submenus off them, and so on. The submenus are ordered, so you can define which order the submenuitems appear.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; Some terminology:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
# each of our records is a node within the tree structure&lt;br /&gt;
# there is a root node which occupies the highest position in the hierarchy; within Joomla we define this root node as being at level 0&lt;br /&gt;
# the root node has a number of children, and these will be at level 1. Each of these children&#039;s  parent is the root node&lt;br /&gt;
# these children may in turn have children of their own, at level 2, and so on.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:NestedSetModel.png|right|Nested Set Model]] &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Node&lt;br /&gt;
! Left&lt;br /&gt;
! Right&lt;br /&gt;
|-&lt;br /&gt;
|Clothing&lt;br /&gt;
|1&lt;br /&gt;
|22&lt;br /&gt;
|-&lt;br /&gt;
|Men&#039;s&lt;br /&gt;
|2&lt;br /&gt;
|9&lt;br /&gt;
|-&lt;br /&gt;
|Suits&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|-&lt;br /&gt;
|Slacks&lt;br /&gt;
|4&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|Jackets&lt;br /&gt;
|6&lt;br /&gt;
|7&lt;br /&gt;
|-&lt;br /&gt;
|Women&#039;s&lt;br /&gt;
|10&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|Dresses&lt;br /&gt;
|11&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|Evening Gowns&lt;br /&gt;
|12&lt;br /&gt;
|13&lt;br /&gt;
|-&lt;br /&gt;
|Sun Dresses&lt;br /&gt;
|14&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|Skirts&lt;br /&gt;
|17&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|Blouses&lt;br /&gt;
|19&lt;br /&gt;
|20&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; To implement this tree structure within a relational database Joomla uses the [https://en.wikipedia.org/wiki/Nested_set_model Nested Set Model]. This involves assigning to each record a left (in Joomla lft) and a right (in Joomla rgt) field, as shown in the diagram and associated table. You should be able to see how using the lft and rgt values you can determine for any node its level in the tree, its parent, and for nodes with the same parent, the ordering of those nodes.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt; While having lft and rgt values may be sufficient to define a tree completely in theory, in practice adding additional fields give more opportunity for navigating the tree efficiently, and in Joomla there are 5 fields associated with a tree structure:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
* lft and rgt fields&lt;br /&gt;
* parent id – the id of the parent node&lt;br /&gt;
* level - the level in the hierarchy, level 0 (Clothing in the example above) being the highest&lt;br /&gt;
* path&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; The path is like the path in a directory structure, and is a join of the alias values going from the root node to the node in question, with a slash separating the aliases. For example, referring to the diagram above, if Clothing is the root node, then the path for Jackets would be Men-s/Suits/Jackets.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; Notice how the additional fields provide us with efficient mechanisms for navigating the tree. For instance, we can do a query selecting records WHERE parent is Suits, and ORDER BY lft, and that will give us Slacks and Jackets in order. These sorts of operations are generally done on the front end, where we want the site to perform well. By contrast, admin operations can involve many updates. For example, if we move Blouses to be the first child under Men&#039;s then it will involve updating the lft and rgt values of nearly all the records in the database table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; As you might expect, Joomla provides library functions to help with positioning a new node in the tree, reparenting an item, deleting an item (and all of its children), reordering items, etc.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; Firstly, we&#039;ll want our install of this step to build the tree structure in our helloworld table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; In our admin helloworlds view we will show the level of the record by indenting the title, as is done for categories and menuitems. We&#039;ll also display the values of our new fields – really for our own diagnostic purposes, as you wouldn&#039;t do this in a real application.&amp;lt;/translate&amp;gt; &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; In the previous step we introduced functionality which enabled the administrator to drag the records to reorder them. We&#039;ll continue using this mechanism, but reordering will be limited to records having the same parent (ie siblings), and the records will have to be ordered in ascending order first (sorting by &amp;quot;Ordering descending&amp;quot; won&#039;t do).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; If we delete an item, then all of its children will be moved up the hierarchy, to have as parent the parent of the deleted record.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In the admin edit view we&#039;ll allow the administrator to:&lt;br /&gt;
* specify a new parent for the item&lt;br /&gt;
* specify the positioning of this item within the order of its siblings&lt;br /&gt;
(albeit, if we change the parent, then the new siblings will appear only after Save).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; We&#039;ll also ensure that New and Save as Copy functionality works as expected.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; In the frontend we&#039;ll change the page which displays a HelloWorld record to present as well the parent and the descendants of that record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; We&#039;ll also update the frontend form for creating a new helloworld record so that it prompts for the parent as well.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; Initially we&#039;ll need to set up our database as a nested set tree. We&#039;ll want record with id=1 to be the root of the tree, so if there&#039;s an existing record with id=1 we&#039;ll give it a new number, and we&#039;ll change any associated records in the Assets and Associations table. After the root record is in place, we&#039;ll set the other helloworld records as direct children of the root, and set the new fields accordingly. As this is too complex to do in SQL script, we&#039;ll code this within the install &amp;lt;tt&amp;gt;script.php&amp;lt;/tt&amp;gt; file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; The code for performing operations on the nested set database fields is within &amp;lt;tt&amp;gt;JTableNested&amp;lt;/tt&amp;gt;, so we change our helloworld table class to inherit from it instead of &amp;lt;tt&amp;gt;JTable&amp;lt;/tt&amp;gt;. We&#039;ll use a number of methods from within this class to apply database changes arising from admin operations:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt; &amp;lt;tt&amp;gt;setLocation($referenceId, $position)&amp;lt;/tt&amp;gt; to define how the current record is positioned (for ordering) with respect to its siblings - we&#039;ll use this when the administrator uses the helloworld edit form and changes the parent or the ordering of the record with respect to its siblings&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; &amp;lt;tt&amp;gt;saveorder($idArray, $lft_array)&amp;lt;/tt&amp;gt; to store a revised order of siblings - we&#039;ll use this whenever the administrator uses the drag record functionality to move a record&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt; &amp;lt;tt&amp;gt;store($updateNulls)&amp;lt;/tt&amp;gt; to store a new or updated record - this will be called by the &amp;lt;tt&amp;gt;save()&amp;lt;/tt&amp;gt; method in &amp;lt;tt&amp;gt;JModelAdmin&amp;lt;/tt&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; &amp;lt;tt&amp;gt;delete($pk, $children)&amp;lt;/tt&amp;gt; to delete a record and (optionally) all of its descendants - we&#039;ll use this whenever the administrator deletes one or more helloworld records, and we&#039;ll use the option of NOT deleting the descendants.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; &amp;lt;tt&amp;gt;rebuild(...)&amp;lt;/tt&amp;gt; to recalculate the lft, rgt and path values for the helloworld records - we&#039;ll use this after we reposition a record by changing its parent or ordering in the edit form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; In our Helloworlds layout file the display of the new fields is straightforward. The other changes involve the following.&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; To indent the records based on the level (as is done for menus and categories) we&#039;ll use the standard joomla layout in layouts/joomla/html/treeprefix.php&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt; To support dragging the rows to reorder, the javascript code in sortablelist.js which we encountered in the previous step [[S:MyLanguage/J3.x:Developing an MVC Component/Adding Ordering|Adding Ordering]] will be used again, but for handing the nested set we specify different parameters to the function, and we need to add different attributes to the &amp;lt;tr&amp;gt; elements.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; In our Helloworld (edit) layout we&#039;ll display the input elements to capture&amp;lt;/translate&amp;gt;  &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; the record&#039;s parent – this will be a list of all the helloworld records, but excluding the record itself (as a record can&#039;t have itself as its parent) and its descendants (as this would form a loop in the tree), and,&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; its position with respect to the record&#039;s siblings – for outputting the siblings in order.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; Because of the specific requirements of these select lists, neither can be implemented using a standard Joomla form field and XML, and we&#039;ll define a custom form field for each and define the list of possible values dynamically.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; In the front end we&#039;ll use another Nested Table function &amp;lt;tt&amp;gt;getTree()&amp;lt;/tt&amp;gt; to find the descendants of the record we&#039;re displaying. And in the front-end form for creating a new record we&#039;ll reuse the admin custom form field for presenting the list of records to choose a parent.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Where in the previous tutorial step we used the &amp;lt;tt&amp;gt;ordering&amp;lt;/tt&amp;gt; database field for ordering, in this step we will use the &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt; database field. So that is a global change within both our admin and site code.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Database and Install == &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; Updated SQL install file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;13-17,32-35&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out` INT(10) NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`checked_out_time` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`alias`  VARCHAR(40)  NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`language`  CHAR(7)  NOT NULL DEFAULT &#039;*&#039;,&lt;br /&gt;
	`parent_id`	int(10)    NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`level`	int(10)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`path`	VARCHAR(400)    NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`lft`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`rgt`	int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`image`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	`latitude` DECIMAL(9,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	`longitude` DECIMAL(10,7) NOT NULL DEFAULT 0.0,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
CREATE UNIQUE INDEX `aliasindex` ON `#__helloworld` (`alias`, `catid`);&lt;br /&gt;
&lt;br /&gt;
/*We added the publish column in order to publish the helloworld root record, otherwise you won&#039;t be able to publish items.*/&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`,`alias`,`language`, `parent_id`, `level`, `path`, `lft`, `rgt`, `published`) VALUES&lt;br /&gt;
(&#039;helloworld root&#039;,&#039;helloworld-root-alias&#039;,&#039;en-GB&#039;, 0, 0, &#039;&#039;, 0, 5, 1),&lt;br /&gt;
(&#039;Hello World!&#039;,&#039;hello-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;hello-world&#039;, 1, 2, 0),&lt;br /&gt;
(&#039;Goodbye World!&#039;,&#039;goodbye-world&#039;,&#039;en-GB&#039;, 1, 1, &#039;goodbye-world&#039;, 3, 4, 0);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; For the upgrade we define the new database structure in the file below ...&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.26.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;/admin/sql/updates/mysql/0.0.26.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE `#__helloworld` DROP COLUMN `ordering`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `parent_id` INT(10) NOT NULL DEFAULT &#039;1&#039; AFTER `language`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `level`	int(10)    NOT NULL DEFAULT &#039;0&#039; AFTER `parent_id`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `path`	varchar(400)    NOT NULL DEFAULT &#039;&#039; AFTER `level`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `lft`	int(11)    NOT NULL DEFAULT &#039;0&#039; AFTER `path`;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `rgt`	int(11)    NOT NULL DEFAULT &#039;0&#039; AFTER `lft`;&lt;br /&gt;
UPDATE `#__helloworld` SET `path` = `alias`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; But for building the tree we use an install &amp;lt;tt&amp;gt;script.php&amp;lt;/tt&amp;gt; file. This code does the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; it checks if there&#039;s already a root record with id=1. If so, then it assumes that the tree has been built, and it exits without changing anything.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; otherwise if there&#039;s an ordinary record with id=1, then it changes its id to one bigger than the max id in the table. It then changes any associated record in the Assets table and in the Associations table. (We looked at how the key in the Associations table was created using an md5 hash in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations|Adding Associations]]. If the helloworld record with id=1 had had this new id originally, then the associations key formed by the md5 hash would have been different, but actually that doesn&#039;t matter. In fact, when the md5 hash is done, if the associations in the array are in a different order then it would produce a different key anyway).&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt; it creates the root record, with id=1, and sets the lft and rgt values for it (based on the total number of records in the table).&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:48--&amp;gt; it updates the lft and rgt values for all the existing helloworld records in the table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;script.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;script.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;93-248&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Script file of HelloWorld component.&lt;br /&gt;
 *&lt;br /&gt;
 * The name of this class is dependent on the component being installed.&lt;br /&gt;
 * The class name should have the component&#039;s name, directly followed by&lt;br /&gt;
 * the text InstallerScript (ex:. com_helloWorldInstallerScript).&lt;br /&gt;
 *&lt;br /&gt;
 * This class will be called by Joomla!&#039;s installer, if specified in your component&#039;s&lt;br /&gt;
 * manifest file, and is used for custom automation actions in its installation process.&lt;br /&gt;
 *&lt;br /&gt;
 * In order to use this automation script, you should reference it in your component&#039;s&lt;br /&gt;
 * manifest file as follows:&lt;br /&gt;
 * &amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
class com_helloWorldInstallerScript&lt;br /&gt;
{&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is installed.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling this method.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function install($parent) &lt;br /&gt;
    {&lt;br /&gt;
        $parent-&amp;gt;getParent()-&amp;gt;setRedirectURL(&#039;index.php?option=com_helloworld&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is uninstalled.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling this method.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function uninstall($parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_UNINSTALL_TEXT&#039;) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * This method is called after a component is updated.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function update($parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::sprintf(&#039;COM_HELLOWORLD_UPDATE_TEXT&#039;, $parent-&amp;gt;get(&#039;manifest&#039;)-&amp;gt;version) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs just before any installation action is preformed on the component.&lt;br /&gt;
     * Verifications and pre-requisites should run in this function.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  string    $type   - Type of PreFlight action. Possible values are:&lt;br /&gt;
     *                           - * install&lt;br /&gt;
     *                           - * update&lt;br /&gt;
     *                           - * discover_install&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    public function preflight($type, $parent) &lt;br /&gt;
    {&lt;br /&gt;
        echo &#039;&amp;lt;p&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_PREFLIGHT_&#039; . $type . &#039;_TEXT&#039;) . &#039;&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs right after any installation action is preformed on the component.&lt;br /&gt;
     *&lt;br /&gt;
     * @param  string    $type   - Type of PostFlight action. Possible values are:&lt;br /&gt;
     *                           - * install&lt;br /&gt;
     *                           - * update&lt;br /&gt;
     *                           - * discover_install&lt;br /&gt;
     * @param  \stdClass $parent - Parent object calling object.&lt;br /&gt;
     *&lt;br /&gt;
     * @return void&lt;br /&gt;
     */&lt;br /&gt;
    function postflight($type, $parent) &lt;br /&gt;
    {&lt;br /&gt;
		$db = JFactory::getDbo();&lt;br /&gt;
		&lt;br /&gt;
		echo &#039;&amp;lt;p&amp;gt;Checking if the root record is already present ...&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
		&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
		$query-&amp;gt;select(&#039;id&#039;);&lt;br /&gt;
		$query-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
		$query-&amp;gt;where(&#039;id = 1&#039;);&lt;br /&gt;
		$query-&amp;gt;where(&#039;alias = &amp;quot;helloworld-root-alias&amp;quot;&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$id = $db-&amp;gt;loadResult();&lt;br /&gt;
		&lt;br /&gt;
		if ($id == &#039;1&#039;)&lt;br /&gt;
		{   // assume tree structure already built&lt;br /&gt;
			echo &#039;&amp;lt;p&amp;gt;Root record already present, install program exiting ...&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		echo &#039;&amp;lt;p&amp;gt;Checking if there is a record with id = 1 ...&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
		&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
		$query-&amp;gt;select(&#039;id&#039;);&lt;br /&gt;
		$query-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
		$query-&amp;gt;where(&#039;id = 1&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$id = $db-&amp;gt;loadResult();&lt;br /&gt;
			&lt;br /&gt;
		if ($id)&lt;br /&gt;
		{&lt;br /&gt;
			echo &#039;&amp;lt;p&amp;gt;Record with id = 1 found&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
			&lt;br /&gt;
			// get new id&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;select(&#039;max(id) + 1&#039;)&lt;br /&gt;
				-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$newid = $db-&amp;gt;loadResult(); &lt;br /&gt;
			echo &amp;quot;&amp;lt;p&amp;gt;Changing id to $newid&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			&lt;br /&gt;
			// update id in helloworld table&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__helloworld&#039;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;id = $newid&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&amp;quot;id = $id&amp;quot;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Id in helloworld table changed, records updated: $nrows&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error: Id in helloworld table not changed&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			// update id in the associations table&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__associations&#039;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;id = $newid&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&amp;quot;id = $id&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&#039;context = &amp;quot;com_helloworld.item&amp;quot;&#039;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Id in associations table changed, records updated: $nrows&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error: Id in associations table not changed&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			// update id in the assets table&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__assets&#039;)&lt;br /&gt;
				-&amp;gt;set(&#039;name = &amp;quot;com_helloworld.helloworld.&#039; . $newid . &#039;&amp;quot;&#039;)&lt;br /&gt;
				-&amp;gt;where(&#039;name = &amp;quot;com_helloworld.helloworld.&#039; . $id . &#039;&amp;quot;&#039;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Id in assets table changed, records updated: $nrows&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error: Id in assets table not changed&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else &lt;br /&gt;
		{&lt;br /&gt;
			echo &#039;&amp;lt;p&amp;gt;No record with id = 1 found&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// find number of records in helloworld table&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;count(*)&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$total = $db-&amp;gt;loadResult(); &lt;br /&gt;
		&lt;br /&gt;
		// insert root record&lt;br /&gt;
		$columns = array(&#039;id&#039;,&#039;greeting&#039;,&#039;alias&#039;,&#039;parent_id&#039;,&#039;rgt&#039;);&lt;br /&gt;
		$values = array(1, &#039;helloworld root&#039;,&#039;helloworld-root-alias&#039;,0, 2 * (int)$total + 1);&lt;br /&gt;
&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;insert(&#039;#__helloworld&#039;)&lt;br /&gt;
			-&amp;gt;columns($db-&amp;gt;quoteName($columns))&lt;br /&gt;
			-&amp;gt;values(implode(&#039;,&#039;, $db-&amp;gt;quote($values)));&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$result = $db-&amp;gt;execute();&lt;br /&gt;
		if ($result)&lt;br /&gt;
		{&lt;br /&gt;
			$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
			echo &amp;quot;&amp;lt;p&amp;gt;$nrows inserted into helloworld table&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			echo &amp;quot;&amp;lt;p&amp;gt;Error creating root record&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			var_dump($result);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// update lft and rgt for each of the other records (ie not root)&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;id&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld&#039;)&lt;br /&gt;
			-&amp;gt;where(&#039;id &amp;gt; 1&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
		$ids = $db-&amp;gt;loadColumn(); &lt;br /&gt;
		for ($i = 0; $i &amp;lt; $total; $i++)&lt;br /&gt;
		{&lt;br /&gt;
			$lft = 2 * (int)$i + 1;&lt;br /&gt;
			$rgt = 2 * (int)$i + 2;&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;update(&#039;#__helloworld&#039;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;lft = {$lft}&amp;quot;)&lt;br /&gt;
				-&amp;gt;set(&amp;quot;rgt = {$rgt}&amp;quot;)&lt;br /&gt;
				-&amp;gt;where(&amp;quot;id = {$ids[$i]}&amp;quot;);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$result = $db-&amp;gt;execute();&lt;br /&gt;
			if ($result)&lt;br /&gt;
			{&lt;br /&gt;
				$nrows = $db-&amp;gt;getAffectedRows();&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;$nrows updated in helloworld table, for id = {$ids[$i]}&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				echo &amp;quot;&amp;lt;p&amp;gt;Error updating record&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
				var_dump($result);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Helloworlds MVC == &amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt; Updated model file to include the new fields. The default ordering has been set to be based on the tree structure, as it&#039;s arguably more appropriate than being based on the greeting.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;37,47,86-87,153-154,157&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
        /**&lt;br /&gt;
         * Constructor.&lt;br /&gt;
         *&lt;br /&gt;
         * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
         *&lt;br /&gt;
         * @see     JController&lt;br /&gt;
         * @since   1.6&lt;br /&gt;
         */&lt;br /&gt;
        public function __construct($config = array())&lt;br /&gt;
        {&lt;br /&gt;
                if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
                {&lt;br /&gt;
                        $config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
                                &#039;id&#039;,&lt;br /&gt;
                                &#039;greeting&#039;,&lt;br /&gt;
                                &#039;author&#039;,&lt;br /&gt;
                                &#039;created&#039;,&lt;br /&gt;
                                &#039;language&#039;,&lt;br /&gt;
                                &#039;lft&#039;,&lt;br /&gt;
                                &#039;category_id&#039;,&lt;br /&gt;
                                &#039;association&#039;,&lt;br /&gt;
                                &#039;published&#039;&lt;br /&gt;
                        );&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($config);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        protected function populateState($ordering = &#039;lft&#039;, $direction = &#039;asc&#039;)&lt;br /&gt;
        {&lt;br /&gt;
                $app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
                // Adjust the context to support modal layouts.&lt;br /&gt;
                if ($layout = $app-&amp;gt;input-&amp;gt;get(&#039;layout&#039;))&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;context .= &#039;.&#039; . $layout;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Adjust the context to support forced languages.&lt;br /&gt;
                $forcedLanguage = $app-&amp;gt;input-&amp;gt;get(&#039;forcedLanguage&#039;, &#039;&#039;, &#039;CMD&#039;);&lt;br /&gt;
                if ($forcedLanguage)&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;context .= &#039;.&#039; . $forcedLanguage;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                parent::populateState($ordering, $direction);&lt;br /&gt;
        &lt;br /&gt;
                // If there&#039;s a forced language then define that filter for the query where clause&lt;br /&gt;
                if (!empty($forcedLanguage))&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;setState(&#039;filter.language&#039;, $forcedLanguage);&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /**&lt;br /&gt;
         * Method to build an SQL query to load the list data.&lt;br /&gt;
         *&lt;br /&gt;
         * @return      string  An SQL query&lt;br /&gt;
         */&lt;br /&gt;
        protected function getListQuery()&lt;br /&gt;
        {&lt;br /&gt;
                // Initialize variables.&lt;br /&gt;
                $db    = JFactory::getDbo();&lt;br /&gt;
                $query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
                // Create the base select statement.&lt;br /&gt;
                $query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created, &lt;br /&gt;
                          a.checked_out as checked_out, a.checked_out_time as checked_out_time, a.catid as catid,&lt;br /&gt;
                          a.lft as lft, a.rgt as rgt, a.parent_id as parent_id, a.level as level, a.path as path,&lt;br /&gt;
                          a.image as imageInfo, a.latitude as latitude, a.longitude as longitude, a.alias as alias, a.language as language&#039;)&lt;br /&gt;
                          -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
                // Join over the categories.&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
                // Join with users table to get the username of the author&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join with users table to get the username of the person who checked the record out&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u2.username&#039;, &#039;editor&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u2&#039;) . &#039; ON u2.id = a.checked_out&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join with languages table to get the language title and image to display&lt;br /&gt;
                // Put these into fields called language_title and language_image so that &lt;br /&gt;
                // we can use the little com_content layout to display the map symbol&lt;br /&gt;
                $query-&amp;gt;select($db-&amp;gt;quoteName(&#039;l.title&#039;, &#039;language_title&#039;) . &amp;quot;,&amp;quot; .$db-&amp;gt;quoteName(&#039;l.image&#039;, &#039;language_image&#039;))&lt;br /&gt;
                        -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__languages&#039;, &#039;l&#039;) . &#039; ON l.lang_code = a.language&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Join over the associations - we just want to know if there are any, at this stage&lt;br /&gt;
                if (JLanguageAssociations::isEnabled())&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;select(&#039;COUNT(asso2.id)&amp;gt;1 as association&#039;)&lt;br /&gt;
                                -&amp;gt;join(&#039;LEFT&#039;, &#039;#__associations AS asso ON asso.id = a.id AND asso.context=&#039; . $db-&amp;gt;quote(&#039;com_helloworld.item&#039;))&lt;br /&gt;
                                -&amp;gt;join(&#039;LEFT&#039;, &#039;#__associations AS asso2 ON asso2.key = asso.key&#039;)&lt;br /&gt;
                                -&amp;gt;group(&#039;a.id&#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter: like / search&lt;br /&gt;
                $search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
                if (!empty($search))&lt;br /&gt;
                {&lt;br /&gt;
                        $like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
                        $query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by published state&lt;br /&gt;
                $published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
                if (is_numeric($published))&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
                }&lt;br /&gt;
                elseif ($published === &#039;&#039;)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by language, if the user has set that in the filter field&lt;br /&gt;
                $language = $this-&amp;gt;getState(&#039;filter.language&#039;);&lt;br /&gt;
                if ($language)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&#039;a.language = &#039; . $db-&amp;gt;quote($language));&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Filter by categories&lt;br /&gt;
                $catid = $this-&amp;gt;getState(&#039;filter.category_id&#039;);&lt;br /&gt;
                if ($catid)&lt;br /&gt;
                {&lt;br /&gt;
                        $query-&amp;gt;where(&amp;quot;a.catid = &amp;quot; . $db-&amp;gt;quote($db-&amp;gt;escape($catid)));&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // exclude root helloworld record&lt;br /&gt;
                $query-&amp;gt;where(&#039;a.id &amp;gt; 1&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Add the list ordering clause.&lt;br /&gt;
                $orderCol       = $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;lft&#039;);&lt;br /&gt;
                $orderDirn      = $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
                $query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
                return $query;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; In our view file we create a mapping of parent id to the ids of its children. This enables us to find more easily the successive parents of a record up the hierarchy, which we&#039;ll do in the layout file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;70-75&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
        /**&lt;br /&gt;
         * Display the Hello World view&lt;br /&gt;
         *&lt;br /&gt;
         * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
         *&lt;br /&gt;
         * @return  void&lt;br /&gt;
         */&lt;br /&gt;
        function display($tpl = null)&lt;br /&gt;
        {&lt;br /&gt;
                // Get application&lt;br /&gt;
                $app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
                // Get data from the model&lt;br /&gt;
                $this-&amp;gt;items                    = $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
                $this-&amp;gt;pagination               = $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
                $this-&amp;gt;state                    = $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
                $this-&amp;gt;filterForm       = $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
                $this-&amp;gt;activeFilters    = $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
                // What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
                $this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Check for errors.&lt;br /&gt;
                if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
                {&lt;br /&gt;
                        JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
                        return false;&lt;br /&gt;
                }&lt;br /&gt;
        &lt;br /&gt;
                // Set the sidebar submenu and toolbar, but not on the modal window&lt;br /&gt;
                if ($this-&amp;gt;getLayout() !== &#039;modal&#039;)&lt;br /&gt;
                {&lt;br /&gt;
                        HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
                        $this-&amp;gt;addToolBar();&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                        // If it&#039;s being displayed to select a record as an association, then forcedLanguage is set&lt;br /&gt;
                        if ($forcedLanguage = $app-&amp;gt;input-&amp;gt;get(&#039;forcedLanguage&#039;, &#039;&#039;, &#039;CMD&#039;))&lt;br /&gt;
                        {&lt;br /&gt;
                                // Transform the language selector filter into an hidden field, so it can&#039;t be set&lt;br /&gt;
                                $languageXml = new SimpleXMLElement(&#039;&amp;lt;field name=&amp;quot;language&amp;quot; type=&amp;quot;hidden&amp;quot; default=&amp;quot;&#039; . $forcedLanguage . &#039;&amp;quot; /&amp;gt;&#039;);&lt;br /&gt;
                                $this-&amp;gt;filterForm-&amp;gt;setField($languageXml, &#039;filter&#039;, true);&lt;br /&gt;
&lt;br /&gt;
                                // Also, unset the active language filter so the search tools is not open by default with this filter.&lt;br /&gt;
                                unset($this-&amp;gt;activeFilters[&#039;language&#039;]);&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Prepare a mapping from parent id to the ids of its children&lt;br /&gt;
                $this-&amp;gt;ordering = array();&lt;br /&gt;
                foreach ($this-&amp;gt;items as $item)&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;ordering[$item-&amp;gt;parent_id][] = $item-&amp;gt;id;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Display the template&lt;br /&gt;
                parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
                // Set the document&lt;br /&gt;
                $this-&amp;gt;setDocument();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /**&lt;br /&gt;
         * Add the page title and toolbar.&lt;br /&gt;
         *&lt;br /&gt;
         * @return  void&lt;br /&gt;
         *&lt;br /&gt;
         * @since   1.6&lt;br /&gt;
         */&lt;br /&gt;
        protected function addToolBar()&lt;br /&gt;
        {&lt;br /&gt;
                $title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
                if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
                {&lt;br /&gt;
                        $title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;) || JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_checkin&#039;))&lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::checkin(&#039;helloworlds.checkin&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::divider();&lt;br /&gt;
                        JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        /**&lt;br /&gt;
         * Method to set up the document properties&lt;br /&gt;
         *&lt;br /&gt;
         * @return void&lt;br /&gt;
         */&lt;br /&gt;
        protected function setDocument() &lt;br /&gt;
        {&lt;br /&gt;
                $document = JFactory::getDocument();&lt;br /&gt;
                $document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; In our layout file we include new columns for the lft, rgt, level and parent fields (although with headings which are just the database field names rather than translated strings), and include the path in small letters below the alias under the greeting. We also change the parameters for the javascript in &amp;lt;tt&amp;gt;sortablelist.js&amp;lt;/tt&amp;gt; which enables the dragging of rows to reorder the rows which have the same parent.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; This javascript code hides all the descendants (not just immediate children) when dragging is being performed, so for each row there&#039;s a little work to create a list of the successive parents of that row, going up the tree hierarchy, which is then put into the parents attribute of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr&amp;amp;gt;&amp;lt;/tt&amp;gt; element. When a row with id=xxx is being dragged, the javascript then hides any row in which the id xxx appears in this parents attribute.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;21,25-26,52,58,61,64,67-78,80,114-138,140,157,165-166,180-182,194-205&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
$user = JFactory::getUser();&lt;br /&gt;
$userId = $user-&amp;gt;get(&#039;id&#039;);&lt;br /&gt;
$saveOrder = ($listOrder == &#039;lft&#039; &amp;amp;&amp;amp; strtolower($listDirn) == &#039;asc&#039;);&lt;br /&gt;
if ($saveOrder)&lt;br /&gt;
{&lt;br /&gt;
        $saveOrderingUrl = &#039;index.php?option=com_helloworld&amp;amp;task=helloworlds.saveOrderAjax&amp;amp;tmpl=component&#039;;&lt;br /&gt;
        // pass true as parameter 7 to indicate that we have a nested set&lt;br /&gt;
        JHtml::_(&#039;sortablelist.sortable&#039;, &#039;helloworldList&#039;, &#039;adminForm&#039;, strtolower($listDirn), $saveOrderingUrl, false, true);&lt;br /&gt;
}&lt;br /&gt;
$assoc = JLanguageAssociations::isEnabled();&lt;br /&gt;
$authorFieldwidth = $assoc ? &amp;quot;10%&amp;quot; : &amp;quot;25%&amp;quot;;&lt;br /&gt;
JLoader::register(&#039;JHtmlHelloworlds&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_helloworld/helpers/html/helloworlds.php&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot; id=&amp;quot;helloworldList&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;&#039;, &#039;lft&#039;, $listDirn, $listOrder, null, &#039;asc&#039;, &#039;JGRID_HEADING_ORDERING&#039;, &#039;icon-menu-2&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_POSITION&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_IMAGE&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;lft&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;rgt&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;level&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo &amp;quot;parent&amp;quot;; ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS&#039;, &#039;association&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;&amp;lt;?php echo $authorFieldwidth; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_LANGUAGE&#039;, &#039;language&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                        $row-&amp;gt;image = new Registry;&lt;br /&gt;
                        $row-&amp;gt;image-&amp;gt;loadString($row-&amp;gt;imageInfo);&lt;br /&gt;
                        // create a list of the parents up the hierarchy to the root &lt;br /&gt;
                        if ($row-&amp;gt;level &amp;gt; 1)&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                            $_currentParentId = $row-&amp;gt;parent_id;&lt;br /&gt;
                            $parentsStr = &#039; &#039; . $_currentParentId;&lt;br /&gt;
                            for ($j = 0; $j &amp;lt; $row-&amp;gt;level; $j++)&lt;br /&gt;
                            {&lt;br /&gt;
                                foreach ($this-&amp;gt;ordering as $k =&amp;gt; $v)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $v = implode(&#039;-&#039;, $v);&lt;br /&gt;
                                    $v = &#039;-&#039; . $v . &#039;-&#039;;&lt;br /&gt;
                                    if (strpos($v, &#039;-&#039; . $_currentParentId . &#039;-&#039;) !== false)&lt;br /&gt;
                                    {&lt;br /&gt;
                                        $parentsStr .= &#039; &#039; . $k;&lt;br /&gt;
                                        $_currentParentId = $k;&lt;br /&gt;
                                        break;&lt;br /&gt;
                                    }&lt;br /&gt;
                                }&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        else&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                        }&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr class=&amp;quot;row&amp;lt;?php echo $i % 2; ?&amp;gt;&amp;quot; sortable-group-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;parent_id; ?&amp;gt;&amp;quot; item-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&amp;quot; parents=&amp;quot;&amp;lt;?php echo $parentsStr; ?&amp;gt;&amp;quot; level=&amp;quot;&amp;lt;?php echo $row-&amp;gt;level; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php&lt;br /&gt;
                                $iconClass = &#039;&#039;;&lt;br /&gt;
                                $canReorder  = $user-&amp;gt;authorise(&#039;core.edit.state&#039;, &#039;com_helloworld.helloworld.&#039; . $row-&amp;gt;id);&lt;br /&gt;
                                if (!$canReorder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive&#039;;&lt;br /&gt;
                                }&lt;br /&gt;
                                elseif (!$saveOrder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive tip-top hasTooltip&amp;quot; title=&amp;quot;&#039; . JHtml::_(&#039;tooltipText&#039;, &#039;JORDERINGDISABLED&#039;);&lt;br /&gt;
                                }&lt;br /&gt;
                                ?&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;sortable-handler&amp;lt;?php echo $iconClass ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;span class=&amp;quot;icon-menu&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($canReorder &amp;amp;&amp;amp; $saveOrder) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;input type=&amp;quot;text&amp;quot; style=&amp;quot;display:none&amp;quot; name=&amp;quot;order[]&amp;quot; size=&amp;quot;5&amp;quot; value=&amp;quot;&amp;lt;?php echo $row-&amp;gt;lft; ?&amp;gt;&amp;quot; class=&amp;quot;width-20 text-area-order&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $row-&amp;gt;level)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($row-&amp;gt;checked_out) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php $canCheckin = $user-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_checkin&#039;) || $row-&amp;gt;checked_out == $userId; ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JHtml::_(&#039;jgrid.checkedout&#039;, $i, $row-&amp;gt;editor, $row-&amp;gt;checked_out_time, &#039;helloworlds.&#039;, $canCheckin); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;small break-word&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JText::sprintf(&#039;JGLOBAL_LIST_ALIAS&#039;, $this-&amp;gt;escape($row-&amp;gt;alias)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo &#039;Path: &#039; . $this-&amp;gt;escape($row-&amp;gt;path); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo &amp;quot;[&amp;quot; . $row-&amp;gt;latitude . &amp;quot;, &amp;quot; . $row-&amp;gt;longitude . &amp;quot;]&amp;quot;; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php&lt;br /&gt;
                                    $caption = $row-&amp;gt;image-&amp;gt;get(&#039;caption&#039;) ? : &#039;&#039; ;&lt;br /&gt;
                                    $src = JURI::root() . ($row-&amp;gt;image-&amp;gt;get(&#039;image&#039;) ? : &#039;&#039; );&lt;br /&gt;
                                    $html = &#039;&amp;lt;p class=&amp;quot;hasTooltip&amp;quot; style=&amp;quot;display: inline-block&amp;quot; data-html=&amp;quot;true&amp;quot; data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;&amp;lt;img width=\&#039;100px\&#039; height=\&#039;100px\&#039; src=\&#039;%s\&#039;&amp;gt;&amp;quot;&amp;gt;%s&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
                                    echo sprintf($html, $src, $caption);  ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;lft; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;rgt; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;level; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;parent_id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                                &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php if ($row-&amp;gt;association) : ?&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JHtml::_(&#039;helloworlds.association&#039;, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JLayoutHelper::render(&#039;joomla.content.language&#039;, $row); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; We also need to change &amp;quot;ordering&amp;quot; option within the filter fields to use the &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt; database field instead of the &amp;lt;tt&amp;gt;ordering&amp;lt;/tt&amp;gt; field which we had in the previous step, and make the default ordering by &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;48,51-52&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;language&amp;quot;&lt;br /&gt;
			type=&amp;quot;contentlanguage&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_FILTER_LANGUAGE&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_FILTER_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_LANGUAGE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;category_id&amp;quot;&lt;br /&gt;
			type=&amp;quot;category&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_FILTER_CATEGORY&amp;quot;&lt;br /&gt;
			extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			published=&amp;quot;0,1,2&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;lft ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;language ASC&amp;quot;&amp;gt;COM_HELLOWORLD_LANGUAGE_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;language DESC&amp;quot;&amp;gt;COM_HELLOWORLD_LANGUAGE_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;association ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ASSOCIATION_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;association DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ASSOCIATION_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Helloworld Edit Form == &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt; The form is updated to include the 2 new input elements for capturing the parent and the ordering.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; The helloworldparent field will result in a &amp;lt;tt&amp;gt;jform[&#039;parent_id&#039;]&amp;lt;/tt&amp;gt; parameter being passed in the HTTP POST from the form, and this will be mapped to the &amp;lt;tt&amp;gt;parent_id&amp;lt;/tt&amp;gt; field of the record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:58--&amp;gt; The helloworldordering field will result in a &amp;lt;tt&amp;gt;jform[&#039;helloworldordering&#039;]&amp;lt;/tt&amp;gt; parameter containing the id of the sibling below which this record should be placed, or a special value of -1 (to set it as the first child) or -2 (to set it as the last child). This field doesn&#039;t map to a field in the database, but will be used to position the location of the edited record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;74-89&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
				addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox validate-greeting&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;latitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-90.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;90.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;longitude&amp;quot;&lt;br /&gt;
				type=&amp;quot;number&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC&amp;quot;&lt;br /&gt;
				min=&amp;quot;-180.0&amp;quot;&lt;br /&gt;
				max=&amp;quot;180.0&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;0.0&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;language&amp;quot; &lt;br /&gt;
				type=&amp;quot;contentlanguage&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;*&amp;quot;&amp;gt;JALL&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldordering&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_ORDERING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ORDERING_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&lt;br /&gt;
				size=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;imageinfo&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;image-info&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_IMAGE_FIELDS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;image&amp;quot;&lt;br /&gt;
				type=&amp;quot;media&amp;quot;&lt;br /&gt;
				preview=&amp;quot;tooltip&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;field name=&amp;quot;alt&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;field name=&amp;quot;caption&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;params&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELDSET_DISPLAY_OPTIONS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
					type=&amp;quot;list&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
					default=&amp;quot;&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_USE_GLOBAL&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;accesscontrol&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FIELDSET_RULES&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;asset_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				filter=&amp;quot;unset&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;rules&amp;quot;&lt;br /&gt;
				type=&amp;quot;rules&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_FIELD_RULES_LABEL&amp;quot;&lt;br /&gt;
				filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
				validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				section=&amp;quot;message&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt; Both of the two new input elements are custom fields, so we will need to provide definitions of them in two new files within the &amp;lt;tt&amp;gt;admin/models/fields&amp;lt;/tt&amp;gt; directory. Firstly the parent:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/fields/helloworldparent.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/fields/helloworldparent.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Class associated with displaying an input field to capture the parent of a helloworld record&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;JPATH_BASE&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
JFormHelper::loadFieldClass(&#039;list&#039;);&lt;br /&gt;
&lt;br /&gt;
class JFormFieldHelloworldParent extends JFormFieldList&lt;br /&gt;
{&lt;br /&gt;
	protected $type = &#039;HelloworldParent&#039;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the field options for the parent&lt;br /&gt;
	 *&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getOptions()&lt;br /&gt;
	{&lt;br /&gt;
		$options = array();&lt;br /&gt;
&lt;br /&gt;
		$db = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;DISTINCT(a.id) AS value, a.greeting AS text, a.level, a.lft&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld AS a&#039;);&lt;br /&gt;
		&lt;br /&gt;
		// Prevent parenting to children of this record, or to itself&lt;br /&gt;
		// If this record has lft = x and rgt = y, then its children have lft &amp;gt; x and rgt &amp;lt; y&lt;br /&gt;
		if ($id = $this-&amp;gt;form-&amp;gt;getValue(&#039;id&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__helloworld&#039;) . &#039; AS h ON h.id = &#039; . (int) $id)&lt;br /&gt;
				-&amp;gt;where(&#039;NOT(a.lft &amp;gt;= h.lft AND a.rgt &amp;lt;= h.rgt)&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$query-&amp;gt;order(&#039;a.lft ASC&#039;);&lt;br /&gt;
		&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			$options = $db-&amp;gt;loadObjectList();&lt;br /&gt;
		}&lt;br /&gt;
		catch (RuntimeException $e)&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseWarning(500, $e-&amp;gt;getMessage());&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// Pad the option text with spaces using depth level as a multiplier.&lt;br /&gt;
		for ($i = 0; $i &amp;lt; count($options); $i++)&lt;br /&gt;
		{&lt;br /&gt;
			$options[$i]-&amp;gt;text = str_repeat(&#039;- &#039;, $options[$i]-&amp;gt;level) . $options[$i]-&amp;gt;text;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Merge any additional options in the XML definition.&lt;br /&gt;
		$options = array_merge(parent::getOptions(), $options);&lt;br /&gt;
&lt;br /&gt;
		return $options;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; And secondly, the ordering&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/fields/helloworldordering.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/fields/helloworldordering.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Class for displaying the Ordering field in the helloworld edit layout&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;JPATH_BASE&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
JFormHelper::loadFieldClass(&#039;list&#039;);&lt;br /&gt;
&lt;br /&gt;
class JFormFieldHelloworldOrdering extends JFormFieldList&lt;br /&gt;
{&lt;br /&gt;
	protected $type = &#039;HelloworldOrdering&#039;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the options for ordering the helloworld record&lt;br /&gt;
	 * This is the list of siblings the record&#039;s siblings - ie those records with the same parent.&lt;br /&gt;
	 * The method requires that parent id be set.&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getOptions()&lt;br /&gt;
	{&lt;br /&gt;
		$options = array();&lt;br /&gt;
&lt;br /&gt;
		// Get the parent&lt;br /&gt;
		$parent_id = $this-&amp;gt;form-&amp;gt;getValue(&#039;parent_id&#039;, 0);&lt;br /&gt;
&lt;br /&gt;
		if (empty($parent_id))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$db = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
			-&amp;gt;select(&#039;a.id AS value, a.greeting AS text&#039;)&lt;br /&gt;
			-&amp;gt;from(&#039;#__helloworld AS a&#039;)&lt;br /&gt;
			-&amp;gt;where(&#039;a.parent_id =&#039; . (int) $parent_id);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order(&#039;a.lft ASC&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Get the options.&lt;br /&gt;
		$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			$options = $db-&amp;gt;loadObjectList();&lt;br /&gt;
		}&lt;br /&gt;
		catch (RuntimeException $e)&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseWarning(500, $e-&amp;gt;getMessage());&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$options = array_merge(&lt;br /&gt;
			array(array(&#039;value&#039; =&amp;gt; &#039;-1&#039;, &#039;text&#039; =&amp;gt; JText::_(&#039;COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_FIRST&#039;))),&lt;br /&gt;
			$options,&lt;br /&gt;
			array(array(&#039;value&#039; =&amp;gt; &#039;-2&#039;, &#039;text&#039; =&amp;gt; JText::_(&#039;COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_LAST&#039;)))&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// Merge any additional options in the XML definition.&lt;br /&gt;
		$options = array_merge(parent::getOptions(), $options);&lt;br /&gt;
&lt;br /&gt;
		return $options;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the field input markup.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  string  The field input markup.&lt;br /&gt;
	 *&lt;br /&gt;
	 * This method returns the input element except if a new record is being created, in which case a text string is output&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getInput()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;form-&amp;gt;getValue(&#039;id&#039;, 0) == 0)&lt;br /&gt;
		{&lt;br /&gt;
			return &#039;&amp;lt;span class=&amp;quot;readonly&amp;quot;&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_ITEM_FIELD_ORDERING_TEXT&#039;) . &#039;&amp;lt;/span&amp;gt;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			return parent::getInput();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Handling Admin Record Updates == &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; Our Helloworld model and Helloworld table code together handle the updates arising from admin operations on the helloworld edit form and on the helloworlds view. With reference to the two updated files below, here&#039;s how these updates are processed.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; &#039;&#039;&#039;Dragging a row to reorder&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
* The dragging is handled within the javascript code in sortablelist.js, and the updated order is sent to the server via an Ajax call to task=helloworlds.saveOrderAjax. &lt;br /&gt;
* The code within the Admin Controller saveOrderAjax() method calls our model saveorder() function.&lt;br /&gt;
* Our model saveorder() in turn calls the saveorder() within JTableNested&lt;br /&gt;
* JTableNested::saveorder() executes the database updates.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt; &#039;&#039;&#039;Deleting records&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt; Clicking the Delete button in the helloworlds view causes an HTTP POST with task=helloworlds.delete and the list of record ids to delete (from the checkboxes which have been checked)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt; The Admin Controller delete() calls the delete() function in the model, passing the array of ids to be deleted.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:68--&amp;gt; As we don&#039;t have a specific delete() function in our helloworld model, this results in the parent Admin Model delete() being called. This function gets the table instance from the model and for each id in the array it calls the table delete() method, passing the id as the single parameter.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:69--&amp;gt; The table delete() method invoked is the delete() in our Helloworld Table class. We&#039;ve overridden the JNestedTable delete() method because if just a single parameter is passed to JNestedTable::delete() then it deletes the children as well as the record. We override it so that the default is NOT to delete the children.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:70--&amp;gt; JNestedTable::delete() deletes the record, and moves each of its children up the hierarchy, to be parented on the deleted record&#039;s parent.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:71--&amp;gt; &#039;&#039;&#039;Edit record to change the parent&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:72--&amp;gt; Clicking Save causes an HTTP post with task=helloworld.save which gets handled by JControllerForm::save(). This function calls the model save().&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:73--&amp;gt; This invokes our helloworld model save() which calls the parent::save() which is in JModelAdmin.&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:74--&amp;gt; JModelAdmin::save() calls table load() to load the existing values, then table bind() to bind the new values&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt; This invokes our Helloworld table bind() function, which checks if the new parent is the same as the existing parent, and when it finds it isn&#039;t it calls table setLocation() to set the position as the last child of that parent&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt; JTableNested::setLocation() stores the parent and the position (ie &#039;last child&#039;) in instance variables&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:77--&amp;gt; Back in JModelAdmin::save() it calls table store().&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt; This invokes JTableNested::store() which moves the edited record and all of its descendants under the new parent record, based on the previously stored instance variables. This fixes the lft and rgt values of all the records in the helloworld database table. However, it doesn&#039;t fix up the path field of the records which have been moved.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt; Back in our helloworld model save() we call the JTableNested rebuild() method to rebuild the whole database table. This is rather a crude method for fixing up the path fields of the moved records. However, if we don&#039;t use in our code the path field then we can omit this step.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:80--&amp;gt; &#039;&#039;&#039;Edit record to change the ordering (but not the parent)&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:81--&amp;gt; Clicking Save causes an HTTP post with task=helloworld.save and jform[&#039;helloworldordering&#039;] set to the id of the field below which we&#039;re positioning this record (or set to -1 (first child) or -2 (last child) as special cases). This POST gets handled by JControllerForm::save() which calls the model save().&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:82--&amp;gt; This invokes our helloworld model save() which calls the parent::save() which is in JModelAdmin.&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:83--&amp;gt; JModelAdmin::save() calls table load() to load the existing values, then table bind() to bind the new values&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt; This invokes our Helloworld table bind() function, which checks if the new parent is the same as the existing parent, and when it finds it is then it calls table setLocation() to set the position as after the record id in the &#039;helloworldordering&#039; element of the array (and handling the special cases of -1 or -2).&amp;lt;/translate&amp;gt; &lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt; JTableNested::setLocation() stores the (unchanged) parent and the position in instance variables&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:86--&amp;gt; Back in JModelAdmin::save() it calls table store().&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:87--&amp;gt; This invokes JTableNested::store() which moves the edited record based on the new position stored in its instance variable. This fixes the lft and rgt values of all the records in the helloworld database table.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:88--&amp;gt; Back in our helloworld model save() we call the JTableNested rebuild() method to rebuild the whole database table. This is very inefficient as there is no need to rebuild the paths in this case!&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:89--&amp;gt; &#039;&#039;&#039;New and Save as Copy&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:90--&amp;gt; Both of these result in an HTTP POST which get handled by JControllerForm::save() which calls the model save(). In the array of data for the new record the id is either not set or set to 0.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt; This invokes our helloworld model save() which calls the parent::save() which is in JModelAdmin.&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:92--&amp;gt; JModelAdmin::save() calls table load() to load the existing values, then table bind() to bind the new values&amp;lt;/translate&amp;gt;&lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:93--&amp;gt; This invokes our Helloworld table bind() function, which checks the &#039;id&#039; element of the array to see if it&#039;s a new record. When it finds it is then it calls table setLocation() to set the position as the last child of the record defined in the &#039;parent_id&#039; array element.&amp;lt;/translate&amp;gt; &lt;br /&gt;
*** &amp;lt;translate&amp;gt;&amp;lt;!--T:94--&amp;gt; JTableNested::setLocation() stores the parent and the (last child) position in instance variables&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:95--&amp;gt; Back in JModelAdmin::save() it calls table store().&amp;lt;/translate&amp;gt;&lt;br /&gt;
** &amp;lt;translate&amp;gt;&amp;lt;!--T:96--&amp;gt; This invokes JTableNested::store() which updates the lft and rgt fields in the table to make room for the new record to be inserted at the position specified by the instance variables set in the setLocation() call. This fixes the lft and rgt values of all the records in the helloworld database table, but doesn&#039;t set the path of our new record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:97--&amp;gt; Back in our helloworld model save() we call the JTableNested rebuild() method to rebuild the whole database table. This is again very inefficient as we should really only be calling the JTableNested rebuildPath() method to set the path of the new record!&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:98--&amp;gt; &#039;&#039;&#039;Addressing the rebuild problem&#039;&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:99--&amp;gt; The inefficiencies associated with having to call the rebuild() method are significant, particularly because it results in the whole helloworld table being processed for all record updates, even if the update is not concerned with adjusting a record&#039;s position in the tree. There are various alternatives to address this issue:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:100--&amp;gt; If you don&#039;t use the path field in your code then you can just ignore it and not bother calling rebuild() to fix it.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:101--&amp;gt; As described in the video accompanying this tutorial step, you can follow the example of com_content and put the code for save() into the helloworld model, rather than calling the parent Admin Model save() to do the work.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:102--&amp;gt; In the helloworld model save() for a record update you can load the existing record from the database, compare its parent id with the data from the form, and call rebuild() only if the parent id is different.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:103--&amp;gt; Our updated model is below. Note that the code has been removed from prepareTable() as defining the order of the records is now done in the bind() method of our helloworld table class.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039; highlight=&amp;quot;214-219,235-236,238-254&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
	// JModelAdmin needs to know this for storing the associations &lt;br /&gt;
	protected $associationsContext = &#039;com_helloworld.item&#039;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override getItem to allow us to convert the JSON-encoded image information&lt;br /&gt;
	 * in the database record into an array for subsequent prefilling of the edit form&lt;br /&gt;
	 * We also use this method to prefill the associations&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($pk = null)&lt;br /&gt;
	{&lt;br /&gt;
		$item = parent::getItem($pk);&lt;br /&gt;
		if ($item AND property_exists($item, &#039;image&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			$registry = new Registry($item-&amp;gt;image);&lt;br /&gt;
			$item-&amp;gt;imageinfo = $registry-&amp;gt;toArray();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Load associated items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$item-&amp;gt;associations = array();&lt;br /&gt;
&lt;br /&gt;
			if ($item-&amp;gt;id != null)&lt;br /&gt;
			{&lt;br /&gt;
				$associations = JLanguageAssociations::getAssociations(&#039;com_helloworld&#039;, &#039;#__helloworld&#039;, &#039;com_helloworld.item&#039;, (int)$item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
				foreach ($associations as $tag =&amp;gt; $association)&lt;br /&gt;
				{&lt;br /&gt;
					$item-&amp;gt;associations[$tag] = $association-&amp;gt;id;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $item; &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.helloworld&#039;,&lt;br /&gt;
			&#039;helloworld&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to preprocess the form to add the association fields dynamically&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return     none&lt;br /&gt;
	 */&lt;br /&gt;
	protected function preprocessForm(JForm $form, $data, $group = &#039;helloworld&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		// Association content items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$languages = JLanguageHelper::getContentLanguages(false, true, null, &#039;ordering&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
			if (count($languages) &amp;gt; 1)&lt;br /&gt;
			{&lt;br /&gt;
				$addform = new SimpleXMLElement(&#039;&amp;lt;form /&amp;gt;&#039;);&lt;br /&gt;
				$fields = $addform-&amp;gt;addChild(&#039;fields&#039;);&lt;br /&gt;
				$fields-&amp;gt;addAttribute(&#039;name&#039;, &#039;associations&#039;);&lt;br /&gt;
				$fieldset = $fields-&amp;gt;addChild(&#039;fieldset&#039;);&lt;br /&gt;
				$fieldset-&amp;gt;addAttribute(&#039;name&#039;, &#039;item_associations&#039;);&lt;br /&gt;
&lt;br /&gt;
				foreach ($languages as $language)&lt;br /&gt;
				{&lt;br /&gt;
					$field = $fieldset-&amp;gt;addChild(&#039;field&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;name&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;type&#039;, &#039;modal_helloworld&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;language&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;label&#039;, $language-&amp;gt;title);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;translate_label&#039;, &#039;false&#039;);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				$form-&amp;gt;load($addform, false);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		parent::preprocessForm($form, $data, $group);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($data))&lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override the JModelAdmin save() function to handle Save as Copy correctly&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   The helloworld record data submitted from the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  parent::save() return value&lt;br /&gt;
	 */&lt;br /&gt;
	public function save($data)&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		JLoader::register(&#039;CategoriesHelper&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_categories/helpers/categories.php&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Validate the category id&lt;br /&gt;
		// validateCategoryId() returns 0 if the catid can&#039;t be found&lt;br /&gt;
		if ((int) $data[&#039;catid&#039;] &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			$data[&#039;catid&#039;] = CategoriesHelper::validateCategoryId($data[&#039;catid&#039;], &#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Alter the greeting and alias for save as copy&lt;br /&gt;
		if ($input-&amp;gt;get(&#039;task&#039;) == &#039;save2copy&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$origTable = clone $this-&amp;gt;getTable();&lt;br /&gt;
			$origTable-&amp;gt;load($input-&amp;gt;getInt(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
			if ($data[&#039;greeting&#039;] == $origTable-&amp;gt;greeting)&lt;br /&gt;
			{&lt;br /&gt;
				list($greeting, $alias) = $this-&amp;gt;generateNewTitle($data[&#039;catid&#039;], $data[&#039;alias&#039;], $data[&#039;greeting&#039;]);&lt;br /&gt;
				$data[&#039;greeting&#039;] = $greeting;&lt;br /&gt;
				$data[&#039;alias&#039;] = $alias;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				if ($data[&#039;alias&#039;] == $origTable-&amp;gt;alias)&lt;br /&gt;
				{&lt;br /&gt;
					$data[&#039;alias&#039;] = &#039;&#039;;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			// standard Joomla practice is to set the new record as unpublished&lt;br /&gt;
			$data[&#039;published&#039;] = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$result = parent::save($data);&lt;br /&gt;
		if ($result)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;getTable()-&amp;gt;rebuild(1);&lt;br /&gt;
		}&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to check if it&#039;s OK to delete a message. Overrides JModelAdmin::canDelete&lt;br /&gt;
	 */&lt;br /&gt;
	protected function canDelete($record)&lt;br /&gt;
	{&lt;br /&gt;
		if( !empty( $record-&amp;gt;id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.delete&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $record-&amp;gt;id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare a helloworld record for saving in the database&lt;br /&gt;
	 */&lt;br /&gt;
	protected function prepareTable($table)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Save the record reordering after a record is dragged to a new position in the helloworlds view&lt;br /&gt;
	 */&lt;br /&gt;
	public function saveorder($idArray = null, $lft_array = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get an instance of the table object.&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
&lt;br /&gt;
		if (!$table-&amp;gt;saveorder($idArray, $lft_array))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;setError($table-&amp;gt;getError());&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/tables/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;17,61-99,170-173&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTableNested&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   JDatabaseDriver  &amp;amp;$db  A database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db)&lt;br /&gt;
	{&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (isset($array[&#039;imageinfo&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;imageinfo&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the imageinfo array to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;imageinfo&#039;]);&lt;br /&gt;
			$array[&#039;image&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Bind the rules.&lt;br /&gt;
		if (isset($array[&#039;rules&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;rules&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$rules = new JAccessRules($array[&#039;rules&#039;]);&lt;br /&gt;
			$this-&amp;gt;setRules($rules);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (isset($array[&#039;parent_id&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			if (!isset($array[&#039;id&#039;]) || $array[&#039;id&#039;] == 0)&lt;br /&gt;
			{   // new record&lt;br /&gt;
				$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
			}&lt;br /&gt;
			elseif (isset($array[&#039;helloworldordering&#039;]))&lt;br /&gt;
			{&lt;br /&gt;
				// when saving a record load() is called before bind() so the table instance will have properties which are the existing field values&lt;br /&gt;
				if ($this-&amp;gt;parent_id == $array[&#039;parent_id&#039;])&lt;br /&gt;
				{&lt;br /&gt;
					// If first is chosen make the item the first child of the selected parent.&lt;br /&gt;
					if ($array[&#039;helloworldordering&#039;] == -1)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;first-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// If last is chosen make it the last child of the selected parent.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] == -2)&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Don&#039;t try to put an item after itself. All other ones put after the selected item.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id != $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setLocation($array[&#039;helloworldordering&#039;], &#039;after&#039;);&lt;br /&gt;
					}&lt;br /&gt;
					// Just leave it where it is if no change is made.&lt;br /&gt;
					elseif ($array[&#039;helloworldordering&#039;] &amp;amp;&amp;amp; $this-&amp;gt;id == $array[&#039;helloworldordering&#039;])&lt;br /&gt;
					{&lt;br /&gt;
						unset($array[&#039;helloworldordering&#039;]);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				// Set the new parent id if parent id not matched and put in last position&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;setLocation($array[&#039;parent_id&#039;], &#039;last-child&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.helloworld.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the asset-parent-id of the item&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId(JTable $table = NULL, $id = NULL)&lt;br /&gt;
	{&lt;br /&gt;
		// We will retrieve the parent-asset from the Asset-table&lt;br /&gt;
		$assetParent = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		// Default: if no asset-parent can be found we take the global asset&lt;br /&gt;
		$assetParentId = $assetParent-&amp;gt;getRootId();&lt;br /&gt;
&lt;br /&gt;
		// Find the parent-asset&lt;br /&gt;
		if (($this-&amp;gt;catid)&amp;amp;&amp;amp; !empty($this-&amp;gt;catid))&lt;br /&gt;
		{&lt;br /&gt;
			// The item has a category as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld.category.&#039; . (int) $this-&amp;gt;catid);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// The item has the component as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Return the found asset-parent-id&lt;br /&gt;
		if ($assetParent-&amp;gt;id)&lt;br /&gt;
		{&lt;br /&gt;
			$assetParentId=$assetParent-&amp;gt;id;&lt;br /&gt;
		}&lt;br /&gt;
		return $assetParentId;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function check()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;alias = trim($this-&amp;gt;alias);&lt;br /&gt;
		if (empty($this-&amp;gt;alias))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;alias = $this-&amp;gt;greeting;&lt;br /&gt;
		}&lt;br /&gt;
		$this-&amp;gt;alias = JFilterOutput::stringURLSafe($this-&amp;gt;alias);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function delete($pk = null, $children = false)&lt;br /&gt;
	{&lt;br /&gt;
		return parent::delete($pk, $children);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Front-end Helloworld Display == &amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:105--&amp;gt; To display the parent and children on the helloworld page there are 3 changes required:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
# In the view, get the data for the parent and for the children using function calls to the model&lt;br /&gt;
# In the model provide the data for these function calls&lt;br /&gt;
# In the layout output the html which includes the parent and children data.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:107--&amp;gt; Note that we&#039;ve changed the model code to allow a parameter to &amp;lt;tt&amp;gt;getItem()&amp;lt;/tt&amp;gt;. This has the side-effect of changing the &amp;lt;tt&amp;gt;this-&amp;gt;item&amp;lt;/tt&amp;gt; variable within the model instance to point to the latest item retrieved. As the functionality within &amp;lt;tt&amp;gt;getMapParams()&amp;lt;/tt&amp;gt; (called from &amp;lt;tt&amp;gt;addMap()&amp;lt;/tt&amp;gt;) uses &amp;lt;tt&amp;gt;this-&amp;gt;item&amp;lt;/tt&amp;gt; to get the latitude and longitude etc for the current record, we need to ensure that the call to &amp;lt;tt&amp;gt;addMap()&amp;lt;/tt&amp;gt; happens before the new code we&#039;re introducing.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:108--&amp;gt; &#039;&#039;&#039;Note.&#039;&#039;&#039; If you had a menuitem pointing to your helloworld record which had id=1 then you&#039;ll need to edit that menuitem to point to the new id.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;42-46&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;addMap();&lt;br /&gt;
&lt;br /&gt;
		$model = $this-&amp;gt;getModel();&lt;br /&gt;
		$this-&amp;gt;parentItem = $model-&amp;gt;getItem($this-&amp;gt;item-&amp;gt;parent_id);&lt;br /&gt;
		$this-&amp;gt;children = $model-&amp;gt;getChildren($this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
		// getChildren includes the record itself (as well as the children) so remove this record&lt;br /&gt;
		unset($this-&amp;gt;children[0]);&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function addMap() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
&lt;br /&gt;
		// everything&#039;s dependent upon JQuery&lt;br /&gt;
		JHtml::_(&#039;jquery.framework&#039;);&lt;br /&gt;
&lt;br /&gt;
		// we need the Openlayers JS and CSS libraries&lt;br /&gt;
		$document-&amp;gt;addScript(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(&amp;quot;https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// ... and our own JS and CSS&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;media/com_helloworld/js/openstreetmap.js&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addStyleSheet(JURI::root() . &amp;quot;media/com_helloworld/css/openstreetmap.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// get the data to pass to our JS code&lt;br /&gt;
		$params = $this-&amp;gt;get(&amp;quot;mapParams&amp;quot;);&lt;br /&gt;
		$document-&amp;gt;addScriptOptions(&#039;params&#039;, $params);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;71,73,75,78-79,184-189&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
JLoader::register(&#039;HelloworldHelperRoute&#039;, JPATH_ROOT . &#039;/components/com_helloworld/helpers/route.php&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var object item&lt;br /&gt;
	 */&lt;br /&gt;
	protected $item;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to auto-populate the model state.&lt;br /&gt;
	 *&lt;br /&gt;
	 * This method should only be called once per instantiation and is designed&lt;br /&gt;
	 * to be called on the first call to the getState() method unless the model&lt;br /&gt;
	 * configuration flag to ignore the request is set.&lt;br /&gt;
	 *&lt;br /&gt;
	 * Note. Calling getState in this method will result in recursion.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	void&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function populateState()&lt;br /&gt;
	{&lt;br /&gt;
		// Get the message id&lt;br /&gt;
		$jinput = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
		$id     = $jinput-&amp;gt;get(&#039;id&#039;, 1, &#039;INT&#039;);&lt;br /&gt;
		$this-&amp;gt;setState(&#039;message.id&#039;, $id);&lt;br /&gt;
&lt;br /&gt;
		// Load the parameters.&lt;br /&gt;
		$this-&amp;gt;setState(&#039;params&#039;, JFactory::getApplication()-&amp;gt;getParams());&lt;br /&gt;
		parent::populateState();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
	 * @return object The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($id = null)&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;item) || !is_null($id)) &lt;br /&gt;
		{&lt;br /&gt;
			$id    = is_null($id) ? $this-&amp;gt;getState(&#039;message.id&#039;) : $id;&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.greeting, h.params, h.image as image, c.title as category, h.latitude as latitude, h.longitude as longitude,&lt;br /&gt;
						h.id as id, h.alias as alias, h.catid as catid, h.parent_id as parent_id, h.level as level&#039;)&lt;br /&gt;
				  -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
				  -&amp;gt;leftJoin(&#039;#__categories as c ON h.catid=c.id&#039;)&lt;br /&gt;
				  -&amp;gt;where(&#039;h.id=&#039; . (int)$id);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery((string)$query);&lt;br /&gt;
		&lt;br /&gt;
			if ($this-&amp;gt;item = $db-&amp;gt;loadObject()) &lt;br /&gt;
			{&lt;br /&gt;
				// Load the JSON string&lt;br /&gt;
				$params = new JRegistry;&lt;br /&gt;
				$params-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;params, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Merge global params with item params&lt;br /&gt;
				$params = clone $this-&amp;gt;getState(&#039;params&#039;);&lt;br /&gt;
				$params-&amp;gt;merge($this-&amp;gt;item-&amp;gt;params);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;params = $params;&lt;br /&gt;
&lt;br /&gt;
				// Convert the JSON-encoded image info into an array&lt;br /&gt;
				$image = new JRegistry;&lt;br /&gt;
				$image-&amp;gt;loadString($this-&amp;gt;item-&amp;gt;image, &#039;JSON&#039;);&lt;br /&gt;
				$this-&amp;gt;item-&amp;gt;imageDetails = $image;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				throw new Exception(&#039;Helloworld id not found&#039;, 404);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;item;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapParams()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;item) &lt;br /&gt;
		{&lt;br /&gt;
			$url = HelloworldHelperRoute::getAjaxURL();&lt;br /&gt;
			$this-&amp;gt;mapParams = array(&lt;br /&gt;
				&#039;latitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;latitude,&lt;br /&gt;
				&#039;longitude&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;longitude,&lt;br /&gt;
				&#039;zoom&#039; =&amp;gt; 10,&lt;br /&gt;
				&#039;greeting&#039; =&amp;gt; $this-&amp;gt;item-&amp;gt;greeting,&lt;br /&gt;
				&#039;ajaxurl&#039; =&amp;gt; $url&lt;br /&gt;
			);&lt;br /&gt;
			return $this-&amp;gt;mapParams; &lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(&#039;No helloworld details available for map&#039;, 500);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getMapSearchResults($mapbounds)&lt;br /&gt;
	{&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
			$query-&amp;gt;select(&#039;h.id, h.alias, h.catid, h.greeting, h.latitude, h.longitude&#039;)&lt;br /&gt;
			   -&amp;gt;from(&#039;#__helloworld as h&#039;)&lt;br /&gt;
			   -&amp;gt;where(&#039;h.latitude &amp;gt; &#039; . $mapbounds[&#039;minlat&#039;] . &lt;br /&gt;
				&#039; AND h.latitude &amp;lt; &#039; . $mapbounds[&#039;maxlat&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;gt; &#039; . $mapbounds[&#039;minlng&#039;] .&lt;br /&gt;
				&#039; AND h.longitude &amp;lt; &#039; . $mapbounds[&#039;maxlng&#039;]);&lt;br /&gt;
&lt;br /&gt;
			if (JLanguageMultilang::isEnabled())&lt;br /&gt;
			{&lt;br /&gt;
				$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
				$query-&amp;gt;where(&#039;h.language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
			$results = $db-&amp;gt;loadObjectList(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			$msg = $e-&amp;gt;getMessage();&lt;br /&gt;
			JFactory::getApplication()-&amp;gt;enqueueMessage($msg, &#039;error&#039;); &lt;br /&gt;
			$results = null;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		for ($i = 0; $i &amp;lt; count($results); $i++) &lt;br /&gt;
		{&lt;br /&gt;
			$results[$i]-&amp;gt;url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $results[$i]-&amp;gt;id . &lt;br /&gt;
				&amp;quot;:&amp;quot; . $results[$i]-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $results[$i]-&amp;gt;catid . $query_lang);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $results; &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getChildren($id)&lt;br /&gt;
	{&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
		$children = $table-&amp;gt;getTree($id);&lt;br /&gt;
		return $children;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;12-20,38-59&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    $query_lang = &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;item-&amp;gt;greeting.(($this-&amp;gt;item-&amp;gt;category and $this-&amp;gt;item-&amp;gt;params-&amp;gt;get(&#039;show_category&#039;))&lt;br /&gt;
                                      ? (&#039; (&#039;.$this-&amp;gt;item-&amp;gt;category.&#039;)&#039;) : &#039;&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    $src = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;image&#039;];&lt;br /&gt;
    if ($src)&lt;br /&gt;
    {&lt;br /&gt;
        $html = &#039;&amp;lt;figure&amp;gt;&lt;br /&gt;
                    &amp;lt;img src=&amp;quot;%s&amp;quot; alt=&amp;quot;%s&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;figcaption&amp;gt;%s&amp;lt;/figcaption&amp;gt;&lt;br /&gt;
                &amp;lt;/figure&amp;gt;&#039;;&lt;br /&gt;
        $alt = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;alt&#039;];&lt;br /&gt;
        $caption = $this-&amp;gt;item-&amp;gt;imageDetails[&#039;caption&#039;];&lt;br /&gt;
        echo sprintf($html, $src, $alt, $caption);&lt;br /&gt;
    } ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;parentItem-&amp;gt;id &amp;gt; 1) : ?&amp;gt;&lt;br /&gt;
	&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_PARENT&#039;) ?&amp;gt;&lt;br /&gt;
	&amp;lt;/h1&amp;gt;&lt;br /&gt;
	&amp;lt;h3&amp;gt;&lt;br /&gt;
		&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $this-&amp;gt;parentItem-&amp;gt;id . &#039;:&#039; . $this-&amp;gt;parentItem-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $this-&amp;gt;parentItem-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
		&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;parentItem-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
	&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;children) : &lt;br /&gt;
		$baseLevel = $this-&amp;gt;item-&amp;gt;level; ?&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_CHILDREN&#039;) ?&amp;gt;&lt;br /&gt;
		&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;lt;?php foreach ($this-&amp;gt;children as $i =&amp;gt; $child) : ?&amp;gt;&lt;br /&gt;
			&amp;lt;h3&amp;gt;&lt;br /&gt;
				&amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $child-&amp;gt;level - $baseLevel)); ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php $url = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $child-&amp;gt;id . &#039;:&#039; . $child-&amp;gt;alias . &#039;&amp;amp;catid=&#039; . $child-&amp;gt;catid . $query_lang); ?&amp;gt;&lt;br /&gt;
				&amp;lt;a href=&amp;quot;&amp;lt;?php echo $url; ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $child-&amp;gt;greeting; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;/h3&amp;gt;&lt;br /&gt;
	&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;map&amp;quot; class=&amp;quot;map&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;map-callout map-callout-bottom&amp;quot; id=&amp;quot;greeting-container&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;searchmap&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo &#039;&amp;lt;input id=&amp;quot;token&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;&#039; . JSession::getFormToken() . &#039;&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;&#039;; ?&amp;gt;&lt;br /&gt;
    &amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;searchHere();&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_SEARCH_HERE_BUTTON&#039;) ?&amp;gt;&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;searchresults&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Helloworld Frontend Form == &amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:110--&amp;gt; To support capturing the parent in the frontend form we reuse the admin custom form field in the add-form xml definition.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:111--&amp;gt; Note that in the functionality for creating a new helloworld record on the frontend we haven&#039;t included a table &amp;lt;tt&amp;gt;rebuild()&amp;lt;/tt&amp;gt; so new records fail to get the &amp;lt;tt&amp;gt;path&amp;lt;/tt&amp;gt; field written in the database. However the new record will get inserted into the tree correctly because the front end uses the admin backend table code, and so it will pick up the inheritance of the Nested Table, with its &amp;lt;tt&amp;gt;bind()&amp;lt;/tt&amp;gt; override etc. This means too that we should remove the code in the model &amp;lt;tt&amp;gt;prepareTable()&amp;lt;/tt&amp;gt; which previously defined the ordering of the new record.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;4,113-120&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    addfieldpath=&amp;quot;/administrator/components/com_helloworld/models/fields&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field &lt;br /&gt;
				name=&amp;quot;alias&amp;quot; &lt;br /&gt;
				type=&amp;quot;text&amp;quot; &lt;br /&gt;
				label=&amp;quot;JFIELD_ALIAS_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_ALIAS_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;JFIELD_ALIAS_PLACEHOLDER&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot; &lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;fields name=&amp;quot;imageinfo&amp;quot; label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_IMAGE_LABEL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;image&amp;quot;&lt;br /&gt;
				type=&amp;quot;file&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_PICTURE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_PICTURE_DESC&amp;quot; &lt;br /&gt;
				accept=&amp;quot;image/*&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
 				name=&amp;quot;caption&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_CAPTION_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_CAPTION_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;alt&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_ALTTEXT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_ALTTEXT_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fields&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;language&amp;quot;&lt;br /&gt;
				type=&amp;quot;contentlanguage&amp;quot;&lt;br /&gt;
				label=&amp;quot;JFIELD_LANGUAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;JFIELD_LANGUAGE_DESC&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;message&amp;quot;&lt;br /&gt;
				type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
				rows=&amp;quot;5&amp;quot;&lt;br /&gt;
				cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
				hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
				validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;parent_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;helloworldparent&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC&amp;quot;&lt;br /&gt;
				default=&amp;quot;1&amp;quot;&lt;br /&gt;
				filter=&amp;quot;int&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/form.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/form.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;104-105&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelForm extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.form&#039;,&lt;br /&gt;
			&#039;add-form&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 * As this form is for add, we&#039;re not prefilling the form with an existing record&lt;br /&gt;
	 * But if the user has previously hit submit and the validation has found an error,&lt;br /&gt;
	 *   then we inject what was previously entered.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 * This returns the script associated with helloworld field greeting validation&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare a helloworld record for saving in the database&lt;br /&gt;
	 */&lt;br /&gt;
	protected function prepareTable($table)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Frontend Category View == &amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:113--&amp;gt; We just have to change the ordering to use the &amp;lt;tt&amp;gt;lft&amp;lt;/tt&amp;gt; database field instead of the &amp;lt;tt&amp;gt;ordering&amp;lt;/tt&amp;gt; field.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/category.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/category.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;18,51&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Model for displaying the helloworld messages in a given category&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
class HelloworldModelCategory extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;alias&#039;,&lt;br /&gt;
				&#039;lft&#039;,&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	protected function populateState($ordering = null, $direction = null)&lt;br /&gt;
	{&lt;br /&gt;
		parent::populateState($ordering, $direction);&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
		$catid = $app-&amp;gt;input-&amp;gt;getInt(&#039;id&#039;);&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;setState(&#039;category.id&#039;, $catid);&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$query-&amp;gt;select(&#039;id, greeting, alias, catid&#039;)&lt;br /&gt;
			-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;))&lt;br /&gt;
			-&amp;gt;where(&#039;catid = &#039; . $catid);&lt;br /&gt;
&lt;br /&gt;
		if (JLanguageMultilang::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
			$query-&amp;gt;where(&#039;language IN (&amp;quot;*&amp;quot;,&amp;quot;&#039; . $lang . &#039;&amp;quot;)&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;lft&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;	&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function getCategoryName()&lt;br /&gt;
	{&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$categories = JCategories::getInstance(&#039;Helloworld&#039;, array());&lt;br /&gt;
		$categoryNode = $categories-&amp;gt;get($catid);   &lt;br /&gt;
		return $categoryNode-&amp;gt;title; &lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	public function getSubcategories()&lt;br /&gt;
	{&lt;br /&gt;
		$catid = $this-&amp;gt;getState(&#039;category.id&#039;); &lt;br /&gt;
		$categories = JCategories::getInstance(&#039;Helloworld&#039;, array());&lt;br /&gt;
		$categoryNode = $categories-&amp;gt;get($catid);&lt;br /&gt;
		$subcats = $categoryNode-&amp;gt;getChildren(); &lt;br /&gt;
        &lt;br /&gt;
		$lang = JFactory::getLanguage()-&amp;gt;getTag();&lt;br /&gt;
		if (JLanguageMultilang::isEnabled() &amp;amp;&amp;amp; $lang)&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &amp;quot;&amp;amp;lang={$lang}&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$query_lang = &#039;&#039;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		foreach ($subcats as $subcat)&lt;br /&gt;
		{&lt;br /&gt;
			$subcat-&amp;gt;url = JRoute::_(&amp;quot;index.php?view=category&amp;amp;id=&amp;quot; . $subcat-&amp;gt;id . $query_lang);&lt;br /&gt;
		}&lt;br /&gt;
		return $subcats;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/filter_category.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/filter_category.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;8,11-12&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;lft ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;COM_HELLOWORLD_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;lft DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_GREETING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;alias ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ALIAS_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;alias DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ALIAS_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;10&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Updated Language Strings == &amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;25-26,37-38&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Any characters allowed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_IMAGE_LABEL=&amp;quot;Image information&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_PICTURE_LABEL=&amp;quot;Image file to upload&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_PICTURE_DESC=&amp;quot;Select the file with the image to upload&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CAPTION_DESC=&amp;quot;Text to use as a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALTTEXT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALTTEXT_DESC=&amp;quot;Text to display if image cannot be shown&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the record which is to be the parent&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
; file upload error conditions&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILEUPLOAD=&amp;quot;PHP Error %s encountered when uploading file&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILETOOLARGE=&amp;quot;Upload file exceeds max size configured in Joomla&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_BADFILENAME=&amp;quot;Upload file has an invalid filename&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_FILE_EXISTS=&amp;quot;Upload file already exists&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_UNABLE_TO_UPLOAD_FILE=&amp;quot;Error creating uploaded file&amp;quot;&lt;br /&gt;
; helloworld greeting page&lt;br /&gt;
COM_HELLOWORLD_PARENT=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CHILDREN=&amp;quot;Children&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SEARCH_HERE_BUTTON=&amp;quot;Search here&amp;quot;&lt;br /&gt;
; Ajax handling errors&lt;br /&gt;
COM_HELLOWORLD_ERROR_NO_RECORDS=&amp;quot;Didn&#039;t get any records&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ERROR_NO_MAP_BOUNDS=&amp;quot;Error: no map bounds&amp;quot;&lt;br /&gt;
; category view, search and ordering fields and headings&lt;br /&gt;
COM_HELLOWORLD_SORT_BY=&amp;quot;Sort by ...&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID_ASC=&amp;quot;id asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID_DESC=&amp;quot;id desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ALIAS_ASC=&amp;quot;alias asc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ALIAS_DESC=&amp;quot;alias desc&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ALIAS_LABEL=&amp;quot;Alias&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_URL_LABEL=&amp;quot;URL&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HEADER_SUBCATEGORIES=&amp;quot;Subcategories&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;34-38&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE=&amp;quot;Language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_POSITION=&amp;quot;Position&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL=&amp;quot;Latitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC=&amp;quot;Enter the position latitude, between -90 and +90 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL=&amp;quot;Longitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC=&amp;quot;Enter the position longitude, between -180 and +180 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the parent record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_FIRST=&amp;quot;-- First record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_LAST=&amp;quot;-- Last record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_TEXT=&amp;quot;Ordering will be available after saving.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC=&amp;quot;Select the appropriate language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_IMAGE_FIELDS=&amp;quot;Image details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL=&amp;quot;Select image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC=&amp;quot;Select an image from the library, or upload a new one&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC=&amp;quot;Alternative text (if image cannot be displayed)&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC=&amp;quot;Provide a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_ASSOCIATIONS=&amp;quot;Message Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_IMAGE=&amp;quot;Image info&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_ASC=&amp;quot;Language ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_DESC=&amp;quot;Language descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_ASC=&amp;quot;Association ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_DESC=&amp;quot;Association descending&amp;quot;&lt;br /&gt;
; Helloworld menuitem - selecting a greeting via modal&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_MODAL_TITLE=&amp;quot;Select greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD=&amp;quot;Select&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_BUTTON_TOOLTIP=&amp;quot;Select a helloworld greeting&amp;quot;&lt;br /&gt;
; Checking in records&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_0=&amp;quot;No records checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_1=&amp;quot;%d record successfully checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_MORE=&amp;quot;%d records successfully checked in.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the Component == &amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:116--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/router.php|site/router.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/view.json.php|site/views/helloworld/view.json.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/view.html.php|site/views/category/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/tmpl/default.php|site/views/category/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#site/views/category/tmpl/default.xml|site/views/category/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/category.php|site/models/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/filter_category.xml|site/models/forms/filter_category.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Levels#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/route.php|site/helpers/route.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/category.php|site/helpers/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/helpers/association.php|site/helpers/association.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/associations.php|admin/helpers/associations.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/html/helloworlds.php|admin/helpers/html/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/html/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/sql/updates/mysql/0.0.17.sql|admin/sql/updates/mysql/0.0.17.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#admin/sql/updates/mysql/0.0.18.sql|admin/sql/updates/mysql/0.0.18.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/sql/updates/mysql/0.0.20.sql|admin/sql/updates/mysql/0.0.20.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/updates/mysql/0.0.21.sql|admin/sql/updates/mysql/0.0.21.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Checkout#admin/sql/updates/mysql/0.0.24.sql|admin/sql/updates/mysql/0.0.24.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Ordering#admin/sql/updates/mysql/0.0.25.sql|admin/sql/updates/mysql/0.0.25.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/updates/mysql/0.0.26.sql|admin/sql/updates/mysql/0.0.26.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldordering.php|admin/models/fields/helloworldordering.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldparent.php|admin/models/fields/helloworldparent.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/modal/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/models/fields/modal/helloworld.php|admin/models/fields/modal/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworlds/tmpl/modal.php|admin/views/helloworlds/tmpl/modal.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Levels#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/js/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#media/js/openstreetmap.js|media/js/openstreetmap.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#media/js/admin-helloworlds-modal.js|media/js/admin-helloworlds-modal.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/css/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#index.html|media/css/openstreetmap.css]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.26&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;router.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;js&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;css&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Ordering|&amp;lt;translate&amp;gt;&amp;lt;!--T:118--&amp;gt; Prev: Adding Ordering&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Versioning|&amp;lt;translate&amp;gt;&amp;lt;!--T:119--&amp;gt; Next: Adding Versioning&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_batch_process&amp;diff=649972</id>
		<title>J3.x:Developing an MVC Component/Adding a batch process</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_batch_process&amp;diff=649972"/>
		<updated>2020-03-18T13:48:22Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:2--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component|Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; In this step we add a helloworld batch process to the backend. An accompanying video is available at [https://youtu.be/v2t_EsBrL-g Adding a batch process].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=v2t_EsBrL-g}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; Joomla provides a number of facilities to enable administrators to update articles and other types of item in batch. These include:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
* moving or copying records into records with a selected category&lt;br /&gt;
* setting the language and/or access for the selected records&lt;br /&gt;
* adding a tag to the selected records&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; In this step we add these facilities into our helloworld component and also provide a batch process to enable the administrator to set the latitude and longitude.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; To implement the batch processes we have to consider the following aspects.&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Batch Button and Modal === &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; We show a Batch button in the toolbar on our helloworlds view. The administrator can click the checkboxes of the helloworld records to process in batch, and then click Batch to proceed.&amp;lt;/translate&amp;gt; &lt;br /&gt;
# &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; When the Batch button is clicked we want a modal to appear with the available options, so we must add the html for the Bootstrap modal. We&#039;ll do this in the helloworlds layout file, and utilise a couple of new subsidiary layouts for the modal body and footer.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; The modal body will contain the html elements for the various options – eg  set language, set access, set lat/long, etc. The elements for setting the language, access, category and tag are all standard Joomla library layouts within the /layouts directory tree. For setting the lat/long position we&#039;ll write our own layout file which we&#039;ll put in a new admin/layouts directory (and we have to remember to include this new folder in the main helloworld.xml manifest file).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; The modal footer will contain the Cancel (for cancelling the operation) and Process (for starting the batch process) buttons.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Handling the HTTP POST in the Controller ===&lt;br /&gt;
&lt;br /&gt;
[[File:joomla-batch.jpg|right|Joomla Batch Processing]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; When the Process button is pressed the javascript code will submit the form and so initiate an HTTP POST request to the server with parameters which include&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* the ids of the records which have been selected for batch processing&lt;br /&gt;
* the batch options which have been chosen&lt;br /&gt;
* the task variable set to &amp;lt;tt&amp;gt;task=helloworld.batch&amp;lt;/tt&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; Joomla will route this to a &amp;lt;tt&amp;gt;batch()&amp;lt;/tt&amp;gt; method in admin/controllers/helloworld.php.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; In our helloworld controller &amp;lt;tt&amp;gt;batch()&amp;lt;/tt&amp;gt; method we do the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
* set up the model to be the helloworld model&lt;br /&gt;
* set up the redirect to present the helloworlds view again, once the batch processing is complete&lt;br /&gt;
* call the parent batch method, passing the model as parameter&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt; The parent batch method (in JControllerForm) will obtain the POST params, perform some verification of them, and then call the &amp;lt;tt&amp;gt;batch()&amp;lt;/tt&amp;gt; method within the passed model, passing the POST parameters.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Executing the batch processes in the Model === &amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; The way the Joomla batch model functionality works is that the JModelAdmin class has a property &amp;lt;tt&amp;gt;$batch_commands&amp;lt;/tt&amp;gt; which is an associative array mapping the index of the batch parameters to the method which will perform that batch operation.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	protected $batch_commands = array(&lt;br /&gt;
		&#039;assetgroup_id&#039; =&amp;gt; &#039;batchAccess&#039;,&lt;br /&gt;
		&#039;language_id&#039; =&amp;gt; &#039;batchLanguage&#039;,&lt;br /&gt;
		&#039;tag&#039; =&amp;gt; &#039;batchTag&#039;,&lt;br /&gt;
	);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; So if in the batch modal an administrator sets the language selector to one of the available languages then &amp;lt;tt&amp;gt;batch[language_id]&amp;lt;/tt&amp;gt; is set within the HTTP POST parameters. The model code looks up &amp;quot;language_id&amp;quot; in this &amp;lt;tt&amp;gt;$batch_commands&amp;lt;/tt&amp;gt; property, finds &amp;quot;batchLanguage&amp;quot; and then proceeds to call the method &amp;lt;tt&amp;gt;batchLanguage()&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt; In our case we will have a method called &amp;lt;tt&amp;gt;batchPosition()&amp;lt;/tt&amp;gt; which will set the lat/long for the selected records, so we need to ensure that:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
* the html input elements are defined so that &amp;lt;tt&amp;gt;batch[position]&amp;lt;/tt&amp;gt; parameters are sent in the HTTP POST&lt;br /&gt;
* we add an extra record to the &amp;lt;tt&amp;gt;$batch_commands&amp;lt;/tt&amp;gt; array, namely &amp;lt;tt&amp;gt;&#039;position&#039; =&amp;gt; &#039;batchPosition&#039;&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; The first aspect is done where we define the html of the input elements in our modal body.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt; The second aspect is done in a &amp;lt;tt&amp;gt;batch()&amp;lt;/tt&amp;gt; method which we write in our helloworld model. This adds in the extra array element and then calls the &amp;lt;tt&amp;gt;parent::batch()&amp;lt;/tt&amp;gt; to initiate all the batch operations.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; Finally we must write our &amp;lt;tt&amp;gt;batchPosition()&amp;lt;/tt&amp;gt; method to update the set of records with the passed-in latitude and longitude values.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Batch Button == &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; We add the batch button in our helloworlds view. Because this is a custom button we need to get a handle on the toolbar instance, and then use &amp;lt;tt&amp;gt;appendButton()&amp;lt;/tt&amp;gt;, as we can&#039;t use a ToolbarHelper function for this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;95,119-127&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
        /**&lt;br /&gt;
         * Display the Hello World view&lt;br /&gt;
         *&lt;br /&gt;
         * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
         *&lt;br /&gt;
         * @return  void&lt;br /&gt;
         */&lt;br /&gt;
        function display($tpl = null)&lt;br /&gt;
        {&lt;br /&gt;
                // Get application&lt;br /&gt;
                $app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
                // Get data from the model&lt;br /&gt;
                $this-&amp;gt;items                    = $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
                $this-&amp;gt;pagination               = $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
                $this-&amp;gt;state                    = $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
                $this-&amp;gt;filterForm       = $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
                $this-&amp;gt;activeFilters    = $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
                // What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
                $this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
                // Check for errors.&lt;br /&gt;
                if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
                {&lt;br /&gt;
                        JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
                        return false;&lt;br /&gt;
                }&lt;br /&gt;
        &lt;br /&gt;
                // Set the sidebar submenu and toolbar, but not on the modal window&lt;br /&gt;
                if ($this-&amp;gt;getLayout() !== &#039;modal&#039;)&lt;br /&gt;
                {&lt;br /&gt;
                        HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
                        $this-&amp;gt;addToolBar();&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                        // If it&#039;s being displayed to select a record as an association, then forcedLanguage is set&lt;br /&gt;
                        if ($forcedLanguage = $app-&amp;gt;input-&amp;gt;get(&#039;forcedLanguage&#039;, &#039;&#039;, &#039;CMD&#039;))&lt;br /&gt;
                        {&lt;br /&gt;
                                // Transform the language selector filter into an hidden field, so it can&#039;t be set&lt;br /&gt;
                                $languageXml = new SimpleXMLElement(&#039;&amp;lt;field name=&amp;quot;language&amp;quot; type=&amp;quot;hidden&amp;quot; default=&amp;quot;&#039; . $forcedLanguage . &#039;&amp;quot; /&amp;gt;&#039;);&lt;br /&gt;
                                $this-&amp;gt;filterForm-&amp;gt;setField($languageXml, &#039;filter&#039;, true);&lt;br /&gt;
&lt;br /&gt;
                                // Also, unset the active language filter so the search tools is not open by default with this filter.&lt;br /&gt;
                                unset($this-&amp;gt;activeFilters[&#039;language&#039;]);&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Prepare a mapping from parent id to the ids of its children&lt;br /&gt;
                $this-&amp;gt;ordering = array();&lt;br /&gt;
                foreach ($this-&amp;gt;items as $item)&lt;br /&gt;
                {&lt;br /&gt;
                        $this-&amp;gt;ordering[$item-&amp;gt;parent_id][] = $item-&amp;gt;id;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // Display the template&lt;br /&gt;
                parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
                // Set the document&lt;br /&gt;
                $this-&amp;gt;setDocument();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /**&lt;br /&gt;
         * Add the page title and toolbar.&lt;br /&gt;
         *&lt;br /&gt;
         * @return  void&lt;br /&gt;
         *&lt;br /&gt;
         * @since   1.6&lt;br /&gt;
         */&lt;br /&gt;
        protected function addToolBar()&lt;br /&gt;
        {&lt;br /&gt;
                $title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
                $bar = JToolbar::getInstance(&#039;toolbar&#039;);&lt;br /&gt;
&lt;br /&gt;
                if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
                {&lt;br /&gt;
                        $title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;) || JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_checkin&#039;))&lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::checkin(&#039;helloworlds.checkin&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                // Add a batch button&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;) &amp;amp;&amp;amp; $this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)&lt;br /&gt;
                        &amp;amp;&amp;amp; $this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit.state&#039;))&lt;br /&gt;
                {&lt;br /&gt;
                        // we use a standard Joomla layout to get the html for the batch button&lt;br /&gt;
                        $layout = new JLayoutFile(&#039;joomla.toolbar.batch&#039;);&lt;br /&gt;
                        $batchButtonHtml = $layout-&amp;gt;render(array(&#039;title&#039; =&amp;gt; JText::_(&#039;JTOOLBAR_BATCH&#039;)));&lt;br /&gt;
                        $bar-&amp;gt;appendButton(&#039;Custom&#039;, $batchButtonHtml, &#039;batch&#039;);&lt;br /&gt;
                }&lt;br /&gt;
                if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
                {&lt;br /&gt;
                        JToolBarHelper::divider();&lt;br /&gt;
                        JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        /**&lt;br /&gt;
         * Method to set up the document properties&lt;br /&gt;
         *&lt;br /&gt;
         * @return void&lt;br /&gt;
         */&lt;br /&gt;
        protected function setDocument() &lt;br /&gt;
        {&lt;br /&gt;
                $document = JFactory::getDocument();&lt;br /&gt;
                $document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Batch Modal == &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; We add the html for the batch modal into the helloworlds layout file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;215-224&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
$user = JFactory::getUser();&lt;br /&gt;
$userId = $user-&amp;gt;get(&#039;id&#039;);&lt;br /&gt;
$saveOrder = ($listOrder == &#039;lft&#039; &amp;amp;&amp;amp; strtolower($listDirn) == &#039;asc&#039;);&lt;br /&gt;
if ($saveOrder)&lt;br /&gt;
{&lt;br /&gt;
        $saveOrderingUrl = &#039;index.php?option=com_helloworld&amp;amp;task=helloworlds.saveOrderAjax&amp;amp;tmpl=component&#039;;&lt;br /&gt;
        // pass true as parameter 7 to indicate that we have a nested set&lt;br /&gt;
        JHtml::_(&#039;sortablelist.sortable&#039;, &#039;helloworldList&#039;, &#039;adminForm&#039;, strtolower($listDirn), $saveOrderingUrl, false, true);&lt;br /&gt;
}&lt;br /&gt;
$assoc = JLanguageAssociations::isEnabled();&lt;br /&gt;
$authorFieldwidth = $assoc ? &amp;quot;10%&amp;quot; : &amp;quot;25%&amp;quot;;&lt;br /&gt;
JLoader::register(&#039;JHtmlHelloworlds&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_helloworld/helpers/html/helloworlds.php&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span12&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot; id=&amp;quot;helloworldList&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;&#039;, &#039;lft&#039;, $listDirn, $listOrder, null, &#039;asc&#039;, &#039;JGRID_HEADING_ORDERING&#039;, &#039;icon-menu-2&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_POSITION&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_IMAGE&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;20%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;,  &#039;JGRID_HEADING_ACCESS&#039;, &#039;access&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS&#039;, &#039;association&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;&amp;lt;?php echo $authorFieldwidth; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_LANGUAGE&#039;, &#039;language&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;10%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                        $row-&amp;gt;image = new Registry;&lt;br /&gt;
                        $row-&amp;gt;image-&amp;gt;loadString($row-&amp;gt;imageInfo);&lt;br /&gt;
                        // create a list of the parents up the hierarchy to the root &lt;br /&gt;
                        if ($row-&amp;gt;level &amp;gt; 1)&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                            $_currentParentId = $row-&amp;gt;parent_id;&lt;br /&gt;
                            $parentsStr = &#039; &#039; . $_currentParentId;&lt;br /&gt;
                            for ($j = 0; $j &amp;lt; $row-&amp;gt;level; $j++)&lt;br /&gt;
                            {&lt;br /&gt;
                                foreach ($this-&amp;gt;ordering as $k =&amp;gt; $v)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $v = implode(&#039;-&#039;, $v);&lt;br /&gt;
                                    $v = &#039;-&#039; . $v . &#039;-&#039;;&lt;br /&gt;
                                    if (strpos($v, &#039;-&#039; . $_currentParentId . &#039;-&#039;) !== false)&lt;br /&gt;
                                    {&lt;br /&gt;
                                        $parentsStr .= &#039; &#039; . $k;&lt;br /&gt;
                                        $_currentParentId = $k;&lt;br /&gt;
                                        break;&lt;br /&gt;
                                    }&lt;br /&gt;
                                }&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        else&lt;br /&gt;
                        {&lt;br /&gt;
                            $parentsStr = &#039;&#039;;&lt;br /&gt;
                        }&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr class=&amp;quot;row&amp;lt;?php echo $i % 2; ?&amp;gt;&amp;quot; sortable-group-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;parent_id; ?&amp;gt;&amp;quot; item-id=&amp;quot;&amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&amp;quot; parents=&amp;quot;&amp;lt;?php echo $parentsStr; ?&amp;gt;&amp;quot; level=&amp;quot;&amp;lt;?php echo $row-&amp;gt;level; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php&lt;br /&gt;
                                $iconClass = &#039;&#039;;&lt;br /&gt;
                                $canReorder  = $user-&amp;gt;authorise(&#039;core.edit.state&#039;, &#039;com_helloworld.helloworld.&#039; . $row-&amp;gt;id);&lt;br /&gt;
                                if (!$canReorder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive&#039;;&lt;br /&gt;
                                }&lt;br /&gt;
                                elseif (!$saveOrder)&lt;br /&gt;
                                {&lt;br /&gt;
                                    $iconClass = &#039; inactive tip-top hasTooltip&amp;quot; title=&amp;quot;&#039; . JHtml::_(&#039;tooltipText&#039;, &#039;JORDERINGDISABLED&#039;);&lt;br /&gt;
                                }&lt;br /&gt;
                                ?&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;sortable-handler&amp;lt;?php echo $iconClass ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;span class=&amp;quot;icon-menu&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($canReorder &amp;amp;&amp;amp; $saveOrder) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;input type=&amp;quot;text&amp;quot; style=&amp;quot;display:none&amp;quot; name=&amp;quot;order[]&amp;quot; size=&amp;quot;5&amp;quot; value=&amp;quot;&amp;lt;?php echo $row-&amp;gt;lft; ?&amp;gt;&amp;quot; class=&amp;quot;width-20 text-area-order&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php $prefix = JLayoutHelper::render(&#039;joomla.html.treeprefix&#039;, array(&#039;level&#039; =&amp;gt; $row-&amp;gt;level)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $prefix; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php if ($row-&amp;gt;checked_out) : ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php $canCheckin = $user-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_checkin&#039;) || $row-&amp;gt;checked_out == $userId; ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JHtml::_(&#039;jgrid.checkedout&#039;, $i, $row-&amp;gt;editor, $row-&amp;gt;checked_out_time, &#039;helloworlds.&#039;, $canCheckin); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;small break-word&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JText::sprintf(&#039;JGLOBAL_LIST_ALIAS&#039;, $this-&amp;gt;escape($row-&amp;gt;alias)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo &#039;Path: &#039; . $this-&amp;gt;escape($row-&amp;gt;path); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo &amp;quot;[&amp;quot; . $row-&amp;gt;latitude . &amp;quot;, &amp;quot; . $row-&amp;gt;longitude . &amp;quot;]&amp;quot;; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php&lt;br /&gt;
                                    $caption = $row-&amp;gt;image-&amp;gt;get(&#039;caption&#039;) ? : &#039;&#039; ;&lt;br /&gt;
                                    $src = JURI::root() . ($row-&amp;gt;image-&amp;gt;get(&#039;image&#039;) ? : &#039;&#039; );&lt;br /&gt;
                                    $html = &#039;&amp;lt;p class=&amp;quot;hasTooltip&amp;quot; style=&amp;quot;display: inline-block&amp;quot; data-html=&amp;quot;true&amp;quot; data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;&amp;lt;img width=\&#039;100px\&#039; height=\&#039;100px\&#039; src=\&#039;%s\&#039;&amp;gt;&amp;quot;&amp;gt;%s&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
                                    echo sprintf($html, $src, $caption);  ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $this-&amp;gt;escape($row-&amp;gt;access_level); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php if ($assoc) : ?&amp;gt;&lt;br /&gt;
                                &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php if ($row-&amp;gt;association) : ?&amp;gt;&lt;br /&gt;
                                        &amp;lt;?php echo JHtml::_(&#039;helloworlds.association&#039;, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JLayoutHelper::render(&#039;joomla.content.language&#039;, $row); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;?php // load the modal for displaying the batch options&lt;br /&gt;
            echo JHtml::_(&lt;br /&gt;
            &#039;bootstrap.renderModal&#039;,&lt;br /&gt;
            &#039;collapseModal&#039;,&lt;br /&gt;
            array(&lt;br /&gt;
                &#039;title&#039; =&amp;gt; JText::_(&#039;COM_HELLOWORLD_BATCH_OPTIONS&#039;),&lt;br /&gt;
                &#039;footer&#039; =&amp;gt; $this-&amp;gt;loadTemplate(&#039;batch_footer&#039;)&lt;br /&gt;
            ),&lt;br /&gt;
            $this-&amp;gt;loadTemplate(&#039;batch_body&#039;)&lt;br /&gt;
        ); ?&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; The &amp;lt;tt&amp;gt;loadTemplate(&#039;batch_xxx&#039;)&amp;lt;/tt&amp;gt; method above will look for a file in the same directory with a filename which is a concatenation of the current filename &#039;default&#039; and &#039;batch_xxx&#039;.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt; We put the html for the modal body into a new default_batch_body.php file, using standard Joomla layouts for the standard options. For our Position option we render a layout which we define ourself below.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default_batch_body.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default_batch_body.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Layout file for the main body component of the modal showing the batch options&lt;br /&gt;
 * This layout displays the various html input elements relating to the batch processes&lt;br /&gt;
 */&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
$published = $this-&amp;gt;state-&amp;gt;get(&#039;filter.published&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;container-fluid&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;div class=&amp;quot;control-group span6&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;controls&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JLayoutHelper::render(&#039;joomla.html.batch.item&#039;, array(&#039;extension&#039; =&amp;gt; &#039;com_helloworld&#039;)); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;controls&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JLayoutHelper::render(&#039;position&#039;, array()); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;div class=&amp;quot;control-group span6&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;controls&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JLayoutHelper::render(&#039;joomla.html.batch.language&#039;, array()); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;controls&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JLayoutHelper::render(&#039;joomla.html.batch.access&#039;, array()); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;controls&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JLayoutHelper::render(&#039;joomla.html.batch.tag&#039;, array()); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; And we define our layout for the Position elements in a new file which we put in a new admin/layouts directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/layouts/position.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/layouts/position.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
$html   = array();&lt;br /&gt;
$html[] = &#039;&amp;lt;fieldset&amp;gt;&#039;;&lt;br /&gt;
$html[] = &#039;&amp;lt;label id=&amp;quot;batch_setposition-lbl&amp;quot; for=&amp;quot;batch_setposition&amp;quot;&amp;gt;&#039; .&lt;br /&gt;
			JText::_(&#039;COM_HELLOWORLD_BATCH_SETPOSITION_LABEL&#039;) . &#039;&amp;lt;/label&amp;gt;&#039;;&lt;br /&gt;
$html[] = &#039;&amp;lt;select name=&amp;quot;batch[position][setposition]&amp;quot;&amp;gt;&#039; .&lt;br /&gt;
			&#039;&amp;lt;option value=&amp;quot;keepPosition&amp;quot; selected&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_BATCH_KEEP_POSITION&#039;) . &#039;&amp;lt;/OPTION&amp;gt;&#039; .&lt;br /&gt;
			&#039;&amp;lt;option value=&amp;quot;changePosition&amp;quot;&amp;gt;&#039; . JText::_(&#039;COM_HELLOWORLD_BATCH_CHANGE_POSITION&#039;) . &#039;&amp;lt;/OPTION&amp;gt;&#039; .&lt;br /&gt;
		  &#039;&amp;lt;/select&amp;gt;&#039;;&lt;br /&gt;
$html[] = &#039;&amp;lt;label id=&amp;quot;batch_latitude-lbl&amp;quot; for=&amp;quot;batch_latitude&amp;quot;&amp;gt;&#039; . &lt;br /&gt;
				JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL&#039;) . &#039;&amp;lt;/label&amp;gt;&#039;;&lt;br /&gt;
$html[] = &#039;&amp;lt;input id=&amp;quot;batch_latitude&amp;quot; name=&amp;quot;batch[position][latitude]&amp;quot; class=&amp;quot;inputbox&amp;quot; type=&amp;quot;number&amp;quot; step=any min=-90.0 max=90.0 placeholder=&amp;quot;0.0&amp;quot;&amp;gt;&#039;;&lt;br /&gt;
$html[] = &#039;&amp;lt;label id=&amp;quot;batch_longitude-lbl&amp;quot; for=&amp;quot;batch_longitude&amp;quot;&amp;gt;&#039; . &lt;br /&gt;
				JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL&#039;) . &#039;&amp;lt;/label&amp;gt;&#039;;&lt;br /&gt;
$html[] = &#039;&amp;lt;input id=&amp;quot;batch_longitude&amp;quot; name=&amp;quot;batch[position][longitude]&amp;quot; class=&amp;quot;inputbox&amp;quot; type=&amp;quot;number&amp;quot; step=any min=-180.0 max=180.0 placeholder=&amp;quot;0.0&amp;quot;&amp;gt;&#039;;&lt;br /&gt;
$html[] = &#039;&amp;lt;/fieldset&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
echo implode(&#039;&#039;, $html);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; The html for the modal Cancel and Process buttons we put into the batch footer file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default_batch_footer.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default_batch_footer.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Layout file for the footer component of the modal showing the batch options&lt;br /&gt;
 */&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;a class=&amp;quot;btn&amp;quot; type=&amp;quot;button&amp;quot; onclick=&amp;quot;document.getElementById(&#039;batch-category-id&#039;).value=&#039;&#039;;document.getElementById(&#039;batch-access&#039;).value=&#039;&#039;;document.getElementById(&#039;batch-language-id&#039;).value=&#039;&#039;;document.getElementById(&#039;batch-user-id&#039;).value=&#039;&#039;;document.getElementById(&#039;batch-tag-id&#039;).value=&#039;&#039;&amp;quot; data-dismiss=&amp;quot;modal&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JText::_(&#039;JCANCEL&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;button class=&amp;quot;btn btn-success&amp;quot; type=&amp;quot;submit&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.batch&#039;);&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JText::_(&#039;JGLOBAL_BATCH_PROCESS&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Controller Changes == &amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; In our helloworld controller we override the JControllerForm &amp;lt;tt&amp;gt;batch()&amp;lt;/tt&amp;gt; method in order to set the model and the redirect back to the same URL, before continuing with the normal batch processing.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;  highlight=&amp;quot;51-56&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 * @since       0.0.9&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	* Implement to allowAdd or not&lt;br /&gt;
	*&lt;br /&gt;
	* Not used at this time (but you can look at how other components use it....)&lt;br /&gt;
	* Overwrites: JControllerForm::allowAdd&lt;br /&gt;
	*&lt;br /&gt;
	* @param array $data&lt;br /&gt;
	* @return bool&lt;br /&gt;
	*/&lt;br /&gt;
	protected function allowAdd($data = array())&lt;br /&gt;
	{&lt;br /&gt;
		return parent::allowAdd($data);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	* Implement to allow edit or not&lt;br /&gt;
	* Overwrites: JControllerForm::allowEdit&lt;br /&gt;
	*&lt;br /&gt;
	* @param array $data&lt;br /&gt;
	* @param string $key&lt;br /&gt;
	* @return bool&lt;br /&gt;
	*/&lt;br /&gt;
	protected function allowEdit($data = array(), $key = &#039;id&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		$id = isset( $data[ $key ] ) ? $data[ $key ] : 0;&lt;br /&gt;
		if( !empty( $id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.edit&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function batch($model = null)&lt;br /&gt;
	{&lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;helloworld&#039;);&lt;br /&gt;
		$this-&amp;gt;setRedirect((string)JUri::getInstance());&lt;br /&gt;
		return parent::batch($model);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Model Changes == &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; We override the JModelAdmin &amp;lt;tt&amp;gt;batch()&amp;lt;/tt&amp;gt; method in order to include our own batch Position method in the array of batch processes. We then write our &amp;lt;tt&amp;gt;batchPosition()&amp;lt;/tt&amp;gt; method, which will check that the user has permission to change each of the helloworld records, and then apply the lat/long changes to the records.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt; We also override the &amp;lt;tt&amp;gt;generateTitle()&amp;lt;/tt&amp;gt; method which is used to generate a new title in the case where we&#039;re copying a record into a new category and there&#039;s a problem of uniqueness of the alias field (similar to the Save as Copy issue which was addressed in the [[S:MyLanguage/J3.2:Developing an MVC Component/Adding an alias | Adding an alias]] tutorial step). We need to override the method because it assumes that &#039;title&#039; is the name of the field to adjust, whereas in our case the field name is &#039;greeting&#039;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; In addition, as described in the accompanying video, the JModelAdmin functionality for copying records into a different category doesn&#039;t quite work for components with Levels. To correct this we can override the JModelAdmin &amp;lt;tt&amp;gt;batchCopy()&amp;lt;/tt&amp;gt; method and include code to position each new record before it is saved.&amp;lt;/translate&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;28-113&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
    // JModelAdmin needs to know this for storing the associations &lt;br /&gt;
	protected $associationsContext = &#039;com_helloworld.item&#039;;&lt;br /&gt;
    &lt;br /&gt;
	// Contenthistory needs to know this for restoring previous versions&lt;br /&gt;
	public $typeAlias = &#039;com_helloworld.helloworld&#039;;&lt;br /&gt;
	&lt;br /&gt;
	// batch processes supported by helloworld (over and above the standard batch processes)&lt;br /&gt;
	protected $helloworld_batch_commands = array(&lt;br /&gt;
		&#039;position&#039; =&amp;gt; &#039;batchPosition&#039;,&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method overriding batch in JModelAdmin so that we can include the additional batch processes&lt;br /&gt;
	 * which the helloworld component supports.&lt;br /&gt;
	 */&lt;br /&gt;
	public function batch($commands, $pks, $contexts)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;batch_commands = array_merge($this-&amp;gt;batch_commands, $this-&amp;gt;helloworld_batch_commands);&lt;br /&gt;
		return parent::batch($commands, $pks, $contexts);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method implementing the batch setting of lat/long values&lt;br /&gt;
	 */&lt;br /&gt;
	protected function batchPosition($value, $pks, $contexts)&lt;br /&gt;
	{&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
&lt;br /&gt;
		if (isset($value[&#039;setposition&#039;]) &amp;amp;&amp;amp; ($value[&#039;setposition&#039;] === &#039;changePosition&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			if (empty($this-&amp;gt;batchSet))&lt;br /&gt;
			{&lt;br /&gt;
				// Set some needed variables.&lt;br /&gt;
				$this-&amp;gt;user = JFactory::getUser();&lt;br /&gt;
				$this-&amp;gt;table = $this-&amp;gt;getTable();&lt;br /&gt;
				$this-&amp;gt;tableClassName = get_class($this-&amp;gt;table);&lt;br /&gt;
				$this-&amp;gt;contentType = new JUcmType;&lt;br /&gt;
				$this-&amp;gt;type = $this-&amp;gt;contentType-&amp;gt;getTypeByTable($this-&amp;gt;tableClassName);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			foreach ($pks as $pk)&lt;br /&gt;
			{&lt;br /&gt;
				if ($this-&amp;gt;user-&amp;gt;authorise(&#039;core.edit&#039;, $contexts[$pk]))&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;table-&amp;gt;reset();&lt;br /&gt;
					$this-&amp;gt;table-&amp;gt;load($pk);&lt;br /&gt;
					if (isset($value[&#039;latitude&#039;]))&lt;br /&gt;
					{&lt;br /&gt;
						$latitude = floatval($value[&#039;latitude&#039;]);&lt;br /&gt;
						if ($latitude &amp;lt;= 90 &amp;amp;&amp;amp; $latitude &amp;gt;= -90)&lt;br /&gt;
						{&lt;br /&gt;
							$this-&amp;gt;table-&amp;gt;latitude = $latitude;&lt;br /&gt;
						}&lt;br /&gt;
					}&lt;br /&gt;
					if (isset($value[&#039;longitude&#039;]))&lt;br /&gt;
					{&lt;br /&gt;
						$longitude = floatval($value[&#039;longitude&#039;]);&lt;br /&gt;
						if ($longitude &amp;lt;= 180 &amp;amp;&amp;amp; $longitude &amp;gt;= -180)&lt;br /&gt;
						{&lt;br /&gt;
							$this-&amp;gt;table-&amp;gt;longitude = $longitude;&lt;br /&gt;
						}&lt;br /&gt;
					}&lt;br /&gt;
					if (!$this-&amp;gt;table-&amp;gt;store())&lt;br /&gt;
					{&lt;br /&gt;
						$this-&amp;gt;setError($this-&amp;gt;table-&amp;gt;getError());&lt;br /&gt;
&lt;br /&gt;
						return false;&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;setError(JText::_(&#039;JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT&#039;));&lt;br /&gt;
&lt;br /&gt;
					return false;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override generateTitle() because the helloworld component uses &#039;greeting&#039; as the title field&lt;br /&gt;
	 */&lt;br /&gt;
	public function generateTitle($categoryId, $table)&lt;br /&gt;
	{&lt;br /&gt;
		// Alter the title &amp;amp; alias&lt;br /&gt;
		$data = $this-&amp;gt;generateNewTitle($categoryId, $table-&amp;gt;alias, $table-&amp;gt;greeting);&lt;br /&gt;
		$table-&amp;gt;greeting = $data[&#039;0&#039;];&lt;br /&gt;
		$table-&amp;gt;alias = $data[&#039;1&#039;];&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override getItem to allow us to convert the JSON-encoded image information&lt;br /&gt;
	 * in the database record into an array for subsequent prefilling of the edit form&lt;br /&gt;
	 * We also use this method to prefill the tags and associations&lt;br /&gt;
	 */&lt;br /&gt;
	public function getItem($pk = null)&lt;br /&gt;
	{&lt;br /&gt;
		$item = parent::getItem($pk);&lt;br /&gt;
		if ($item AND property_exists($item, &#039;image&#039;))&lt;br /&gt;
		{&lt;br /&gt;
			$registry = new Registry($item-&amp;gt;image);&lt;br /&gt;
			$item-&amp;gt;imageinfo = $registry-&amp;gt;toArray();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (!empty($item-&amp;gt;id))&lt;br /&gt;
		{&lt;br /&gt;
			$tagsHelper = new JHelperTags;&lt;br /&gt;
			$item-&amp;gt;tags = $tagsHelper-&amp;gt;getTagIds($item-&amp;gt;id, &#039;com_helloworld.helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Load associated items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$item-&amp;gt;associations = array();&lt;br /&gt;
&lt;br /&gt;
			if ($item-&amp;gt;id != null)&lt;br /&gt;
			{&lt;br /&gt;
				$associations = JLanguageAssociations::getAssociations(&#039;com_helloworld&#039;, &#039;#__helloworld&#039;, &#039;com_helloworld.item&#039;, (int)$item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
				foreach ($associations as $tag =&amp;gt; $association)&lt;br /&gt;
				{&lt;br /&gt;
					$item-&amp;gt;associations[$tag] = $association-&amp;gt;id;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $item; &lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.helloworld&#039;,&lt;br /&gt;
			&#039;helloworld&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to preprocess the form to add the association fields dynamically&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return     none&lt;br /&gt;
	 */&lt;br /&gt;
	protected function preprocessForm(JForm $form, $data, $group = &#039;helloworld&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		// Association content items&lt;br /&gt;
		if (JLanguageAssociations::isEnabled())&lt;br /&gt;
		{&lt;br /&gt;
			$languages = JLanguageHelper::getContentLanguages(false, true, null, &#039;ordering&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
			if (count($languages) &amp;gt; 1)&lt;br /&gt;
			{&lt;br /&gt;
				$addform = new SimpleXMLElement(&#039;&amp;lt;form /&amp;gt;&#039;);&lt;br /&gt;
				$fields = $addform-&amp;gt;addChild(&#039;fields&#039;);&lt;br /&gt;
				$fields-&amp;gt;addAttribute(&#039;name&#039;, &#039;associations&#039;);&lt;br /&gt;
				$fieldset = $fields-&amp;gt;addChild(&#039;fieldset&#039;);&lt;br /&gt;
				$fieldset-&amp;gt;addAttribute(&#039;name&#039;, &#039;item_associations&#039;);&lt;br /&gt;
&lt;br /&gt;
				foreach ($languages as $language)&lt;br /&gt;
				{&lt;br /&gt;
					$field = $fieldset-&amp;gt;addChild(&#039;field&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;name&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;type&#039;, &#039;modal_helloworld&#039;);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;language&#039;, $language-&amp;gt;lang_code);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;label&#039;, $language-&amp;gt;title);&lt;br /&gt;
					$field-&amp;gt;addAttribute(&#039;translate_label&#039;, &#039;false&#039;);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				$form-&amp;gt;load($addform, false);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		parent::preprocessForm($form, $data, $group);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($data))&lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to override the JModelAdmin save() function to handle Save as Copy correctly&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   The helloworld record data submitted from the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  parent::save() return value&lt;br /&gt;
	 */&lt;br /&gt;
	public function save($data)&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		JLoader::register(&#039;CategoriesHelper&#039;, JPATH_ADMINISTRATOR . &#039;/components/com_categories/helpers/categories.php&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Validate the category id&lt;br /&gt;
		// validateCategoryId() returns 0 if the catid can&#039;t be found&lt;br /&gt;
		if ((int) $data[&#039;catid&#039;] &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			$data[&#039;catid&#039;] = CategoriesHelper::validateCategoryId($data[&#039;catid&#039;], &#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Alter the greeting and alias for save as copy&lt;br /&gt;
		if ($input-&amp;gt;get(&#039;task&#039;) == &#039;save2copy&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$origTable = clone $this-&amp;gt;getTable();&lt;br /&gt;
			$origTable-&amp;gt;load($input-&amp;gt;getInt(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
			if ($data[&#039;greeting&#039;] == $origTable-&amp;gt;greeting)&lt;br /&gt;
			{&lt;br /&gt;
				list($greeting, $alias) = $this-&amp;gt;generateNewTitle($data[&#039;catid&#039;], $data[&#039;alias&#039;], $data[&#039;greeting&#039;]);&lt;br /&gt;
				$data[&#039;greeting&#039;] = $greeting;&lt;br /&gt;
				$data[&#039;alias&#039;] = $alias;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				if ($data[&#039;alias&#039;] == $origTable-&amp;gt;alias)&lt;br /&gt;
				{&lt;br /&gt;
					$data[&#039;alias&#039;] = &#039;&#039;;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			// standard Joomla practice is to set the new record as unpublished&lt;br /&gt;
			$data[&#039;published&#039;] = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$result = parent::save($data);&lt;br /&gt;
		if ($result)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;getTable()-&amp;gt;rebuild(1);&lt;br /&gt;
		}&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to check if it&#039;s OK to delete a message. Overrides JModelAdmin::canDelete&lt;br /&gt;
	 */&lt;br /&gt;
	protected function canDelete($record)&lt;br /&gt;
	{&lt;br /&gt;
		if( !empty( $record-&amp;gt;id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.delete&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $record-&amp;gt;id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare a helloworld record for saving in the database&lt;br /&gt;
	 */&lt;br /&gt;
	protected function prepareTable($table)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Save the record reordering after a record is dragged to a new position in the helloworlds view&lt;br /&gt;
	 */&lt;br /&gt;
	public function saveorder($idArray = null, $lft_array = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get an instance of the table object.&lt;br /&gt;
		$table = $this-&amp;gt;getTable();&lt;br /&gt;
&lt;br /&gt;
		if (!$table-&amp;gt;saveorder($idArray, $lft_array))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;setError($table-&amp;gt;getError());&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Updated Language Strings == &amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;110-114&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE=&amp;quot;Language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_POSITION=&amp;quot;Position&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_DESC=&amp;quot;Message description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_DESCRIPTION_LABEL=&amp;quot;Description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL=&amp;quot;Latitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC=&amp;quot;Enter the position latitude, between -90 and +90 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL=&amp;quot;Longitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC=&amp;quot;Enter the position longitude, between -180 and +180 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_LABEL=&amp;quot;Parent&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_PARENT_DESC=&amp;quot;Select the parent record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_FIRST=&amp;quot;-- First record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_VALUE_LAST=&amp;quot;-- Last record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ITEM_FIELD_ORDERING_TEXT=&amp;quot;Ordering will be available after saving.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC=&amp;quot;Select the appropriate language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_IMAGE_FIELDS=&amp;quot;Image details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL=&amp;quot;Select image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC=&amp;quot;Select an image from the library, or upload a new one&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC=&amp;quot;Alternative text (if image cannot be displayed)&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC=&amp;quot;Provide a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_ASSOCIATIONS=&amp;quot;Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_ASSOCIATIONS=&amp;quot;Message Associations&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_IMAGE=&amp;quot;Image info&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Ordering ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Ordering descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_GREETING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_ASC=&amp;quot;Language ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_DESC=&amp;quot;Language descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_ASC=&amp;quot;Association ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ASSOCIATION_DESC=&amp;quot;Association descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_ASC=&amp;quot;Access ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DESC=&amp;quot;Access descending&amp;quot;&lt;br /&gt;
; Helloworld menuitem - selecting a greeting via modal&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_MODAL_TITLE=&amp;quot;Select greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD=&amp;quot;Select&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_BUTTON_TOOLTIP=&amp;quot;Select a helloworld greeting&amp;quot;&lt;br /&gt;
; Checking in records&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_0=&amp;quot;No records checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_1=&amp;quot;%d record successfully checked in.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_CHECKED_IN_MORE=&amp;quot;%d records successfully checked in.&amp;quot;&lt;br /&gt;
; Batch functionality&lt;br /&gt;
COM_HELLOWORLD_BATCH_OPTIONS=&amp;quot;Helloworld component batch options&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_BATCH_SETPOSITION_LABEL=&amp;quot;Set location&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_BATCH_KEEP_POSITION=&amp;quot;Keep existing location&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_BATCH_CHANGE_POSITION=&amp;quot;Change location&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the Component == &amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/router.php|site/router.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/view.json.php|site/views/helloworld/view.json.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/view.html.php|site/views/category/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/views/category/tmpl/default.php|site/views/category/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#site/views/category/tmpl/default.xml|site/views/category/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#site/models/category.php|site/models/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#site/models/forms/filter_category.xml|site/models/forms/filter_category.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Access#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#site/helpers/route.php|site/helpers/route.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/category.php|site/helpers/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#site/helpers/association.php|site/helpers/association.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/associations.php|admin/helpers/associations.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/helpers/html/helloworlds.php|admin/helpers/html/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/html/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/sql/updates/mysql/0.0.17.sql|admin/sql/updates/mysql/0.0.17.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#admin/sql/updates/mysql/0.0.18.sql|admin/sql/updates/mysql/0.0.18.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/sql/updates/mysql/0.0.20.sql|admin/sql/updates/mysql/0.0.20.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/updates/mysql/0.0.21.sql|admin/sql/updates/mysql/0.0.21.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Checkout#admin/sql/updates/mysql/0.0.24.sql|admin/sql/updates/mysql/0.0.24.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Ordering#admin/sql/updates/mysql/0.0.25.sql|admin/sql/updates/mysql/0.0.25.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/sql/updates/mysql/0.0.26.sql|admin/sql/updates/mysql/0.0.26.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/sql/updates/mysql/0.0.27.sql|admin/sql/updates/mysql/0.0.27.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/sql/updates/mysql/0.0.28.sql|admin/sql/updates/mysql/0.0.28.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/sql/updates/mysql/0.0.29.sql|admin/sql/updates/mysql/0.0.29.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldordering.php|admin/models/fields/helloworldordering.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Levels#admin/models/fields/helloworldparent.php|admin/models/fields/helloworldparent.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/modal/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/models/fields/modal/helloworld.php|admin/models/fields/modal/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Access#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Versioning#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#admin/views/helloworlds/tmpl/default_batch_body.php|admin/views/helloworlds/tmpl/default_batch_body.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#admin/views/helloworlds/tmpl/default_batch_footer.php|admin/views/helloworlds/tmpl/default_batch_footer.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Associations#admin/views/helloworlds/tmpl/modal.php|admin/views/helloworlds/tmpl/modal.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/layouts/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a batch process#admin/layouts/position.php|admin/layouts/position.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding Tags#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding a batch process#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding Associations#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/js/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#media/js/openstreetmap.js|media/js/openstreetmap.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#media/js/admin-helloworlds-modal.js|media/js/admin-helloworlds-modal.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/css/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#index.html|media/css/openstreetmap.css]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,89-90&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.30&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;router.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;js&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;css&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- layout files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;layouts&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Access|Prev: Adding Access&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Cache|Next: Adding Cache&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_Modal&amp;diff=649028</id>
		<title>J3.x:Developing an MVC Component/Adding a Modal</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_Modal&amp;diff=649028"/>
		<updated>2020-03-10T19:16:19Z</updated>

		<summary type="html">&lt;p&gt;ThiagoG: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
In this step we add a modal, and an accompanying video is available at [https://youtu.be/5qJ6qT9dpXQ Adding a Modal].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=5qJ6qT9dpXQ}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Modals, or modal windows, are the pop-up-like windows which appear in several places within Joomla. Examples are:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
* When as an administrator you create a new menu item, and select a Menu Item Type of Articles / Single Article, then when you click to select the article, a pop-up appears displaying the details of the articles available and allowing you to select one.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
* If you enabled the Administrator Multilanguage Status module as part of making your site multilingual in the previous step, then when you click on the &amp;quot;Multilingual Status&amp;quot; button at the bottom left of each admin page, a pop-up appears which shows the status of the multilingual functionality on your site.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
Of course, these modals aren&#039;t really browser pop-up windows - users often disable browser pop-up windows - but rather use CSS and Javascript to give the appearance of pop-ups, and Joomla currently uses the [https://getbootstrap.com/docs/4.0/components/modal/ Bootstrap Modal] framework.&amp;lt;/translate&amp;gt; &amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; The HTML elements which comprise the modal are already within the HTML of the page, but hidden. When you click on an appropriate button (such as the Select button to select an article in the first example above), then the javascript code behind the button click does the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
* the HTML hidden elements of the modal are made visible&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
* a new div element covering the whole of the browser window is created; this backdrop is coloured black, and has partial opacity, so this gives the appearance of greying out what&#039;s behind the modal&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
* in the CSS the z-index is defined so that the modal appears above the backdrop.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
When you close the modal by selecting eg an article, or by clicking the close button, then the HTML elements of the modal are made hidden once more, the backdrop div is removed and any item you selected is passed by javascript to the appropriate field on the main form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Each modal consists of 3 parts:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
* a modal header at the top, usually with the title and an X button to close the modal,&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* a modal body, where the main information appears, and,&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
* a modal footer, with buttons such as Close, Save, etc, depending upon the context.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
In general within Joomla the modal body is an iframe element, and hence is an embedded HTML page within the overall page, and HTTP requests can be made to obtain the data to display in the iframe, filter and sort it, and so on.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
Currently within our helloworld component we have the ability to create a new menu item with a menu item type of &amp;quot;hello world&amp;quot; which will display a single helloworld message on our site. However, in choosing the message to display we have only a simple list field, and we have to scroll down the list of greetings to select the appropriate one. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
In this step we change the user interface so that when selecting the helloworld message for a new menu item, the administrator is presented with a modal with all the details of the helloworld records, similar to what is shown when the administrator clicks on Components / Hello World. In this way the administrator is presented with a much nicer interface, with ordering, search and filter functionality. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:22--&amp;gt; &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The definition of what is displayed when an admin selects a menuitem of type Hello World is defined in the xml file of the site helloworld layout file, ie site/views/helloworld/tmpl/default.xml. We need to change the field definition in that file to be a custom field type which we&#039;ll call modal_helloworld.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
We need to provide Joomla with the code for our custom field, and we&#039;ll provide a new file to generate the html to display our custom input field. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
Finally we need to consider the display of the helloworld records within our modal. We&#039;ll use a presentation similar to that shown when the administrator navigates to Components / Hello world, so we&#039;ll reuse our helloworlds view, but we&#039;ll generate a new layout file instead of our current admin views/helloworlds/tmpl/default.php. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Helloworld menuitem definition == &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt; We change the custom field for selecting the Helloworld record to be displayed.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/tmpl/default.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;site/views/helloworld/tmpl/default.xml&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13-14&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
	&amp;lt;fields&lt;br /&gt;
			name=&amp;quot;request&amp;quot;&lt;br /&gt;
			addfieldpath=&amp;quot;/administrator/components/com_helloworld/models/fields&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset name=&amp;quot;request&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;id&amp;quot;&lt;br /&gt;
					type=&amp;quot;modal_helloworld&amp;quot;&lt;br /&gt;
					required=&amp;quot;true&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC&amp;quot;&lt;br /&gt;
					/&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Field definition == &amp;lt;!--T:28--&amp;gt; &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The field definition for our new custom field goes into the admin/models/fields directory. Because the field type is called modal_helloworld, with an underscore in between, Joomla will look in a /modal subdirectory for a file helloworld.php. Hence our new custom field is defined in &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/fields/modal/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/models/fields/modal/helloworld.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
defined(&#039;JPATH_BASE&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Supports a modal for selecting a helloworld record&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
class JFormFieldModal_Helloworld extends JFormField&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the html for the input field.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  string  The field input html.&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getInput()&lt;br /&gt;
	{&lt;br /&gt;
		// Load language&lt;br /&gt;
		JFactory::getLanguage()-&amp;gt;load(&#039;com_helloworld&#039;, JPATH_ADMINISTRATOR);&lt;br /&gt;
&lt;br /&gt;
		// $this-&amp;gt;value is set if there&#039;s a default id specified in the xml file&lt;br /&gt;
		$value = (int) $this-&amp;gt;value &amp;gt; 0 ? (int) $this-&amp;gt;value : &#039;&#039;;&lt;br /&gt;
        &lt;br /&gt;
		// $this-&amp;gt;id will be jform_request_xxx where xxx is the name of the field in the xml file&lt;br /&gt;
		$modalId = &#039;Helloworld_&#039; . $this-&amp;gt;id;&lt;br /&gt;
&lt;br /&gt;
		// Add the modal field script to the document head.&lt;br /&gt;
		JHtml::_(&#039;jquery.framework&#039;);&lt;br /&gt;
		JHtml::_(&#039;script&#039;, &#039;system/modal-fields.js&#039;, array(&#039;version&#039; =&amp;gt; &#039;auto&#039;, &#039;relative&#039; =&amp;gt; true));&lt;br /&gt;
&lt;br /&gt;
		// our callback function from the modal to the main window:&lt;br /&gt;
		JFactory::getDocument()-&amp;gt;addScriptDeclaration(&amp;quot;&lt;br /&gt;
			function jSelectHelloworld_&amp;quot; . $this-&amp;gt;id . &amp;quot;(id, title, catid, object, url, language) {&lt;br /&gt;
				window.processModalSelect(&#039;Helloworld&#039;, &#039;&amp;quot; . $this-&amp;gt;id . &amp;quot;&#039;, id, title, catid, object, url, language);&lt;br /&gt;
			}&lt;br /&gt;
			&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// if a default id is set, then get the corresponding greeting to display it&lt;br /&gt;
		if ($value)&lt;br /&gt;
		{&lt;br /&gt;
			$db    = JFactory::getDbo();&lt;br /&gt;
			$query = $db-&amp;gt;getQuery(true)&lt;br /&gt;
				-&amp;gt;select($db-&amp;gt;quoteName(&#039;greeting&#039;))&lt;br /&gt;
				-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;))&lt;br /&gt;
				-&amp;gt;where($db-&amp;gt;quoteName(&#039;id&#039;) . &#039; = &#039; . (int) $value);&lt;br /&gt;
			$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
			try&lt;br /&gt;
			{&lt;br /&gt;
				$title = $db-&amp;gt;loadResult();&lt;br /&gt;
			}&lt;br /&gt;
			catch (RuntimeException $e)&lt;br /&gt;
			{&lt;br /&gt;
				JError::raiseWarning(500, $e-&amp;gt;getMessage());&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// display the default greeting or &amp;quot;Select&amp;quot; if no default specified&lt;br /&gt;
		$title = empty($title) ? JText::_(&#039;COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD&#039;) : htmlspecialchars($title, ENT_QUOTES, &#039;UTF-8&#039;);&lt;br /&gt;
		$html  = &#039;&amp;lt;span class=&amp;quot;input-append&amp;quot;&amp;gt;&#039;;&lt;br /&gt;
		$html .= &#039;&amp;lt;input class=&amp;quot;input-medium&amp;quot; id=&amp;quot;&#039; . $this-&amp;gt;id . &#039;_name&amp;quot; type=&amp;quot;text&amp;quot; value=&amp;quot;&#039; . $title . &#039;&amp;quot; disabled=&amp;quot;disabled&amp;quot; size=&amp;quot;35&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
		// html for the Select button&lt;br /&gt;
		$html .= &#039;&amp;lt;a&#039;&lt;br /&gt;
			. &#039; class=&amp;quot;btn hasTooltip&#039; . ($value ? &#039; hidden&#039; : &#039;&#039;) . &#039;&amp;quot;&#039;&lt;br /&gt;
			. &#039; id=&amp;quot;&#039; . $this-&amp;gt;id . &#039;_select&amp;quot;&#039;&lt;br /&gt;
			. &#039; data-toggle=&amp;quot;modal&amp;quot;&#039;&lt;br /&gt;
			. &#039; role=&amp;quot;button&amp;quot;&#039;&lt;br /&gt;
			. &#039; href=&amp;quot;#ModalSelect&#039; . $modalId . &#039;&amp;quot;&#039;&lt;br /&gt;
			. &#039; title=&amp;quot;&#039; . JHtml::tooltipText(&#039;COM_HELLOWORLD_MENUITEM_SELECT_BUTTON_TOOLTIP&#039;) . &#039;&amp;quot;&amp;gt;&#039;&lt;br /&gt;
			. &#039;&amp;lt;span class=&amp;quot;icon-file&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &#039; . JText::_(&#039;JSELECT&#039;)&lt;br /&gt;
			. &#039;&amp;lt;/a&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
		// html for the Clear button&lt;br /&gt;
		$html .= &#039;&amp;lt;a&#039;&lt;br /&gt;
			. &#039; class=&amp;quot;btn&#039; . ($value ? &#039;&#039; : &#039; hidden&#039;) . &#039;&amp;quot;&#039;&lt;br /&gt;
			. &#039; id=&amp;quot;&#039; . $this-&amp;gt;id . &#039;_clear&amp;quot;&#039;&lt;br /&gt;
			. &#039; href=&amp;quot;#&amp;quot;&#039;&lt;br /&gt;
			. &#039; onclick=&amp;quot;window.processModalParent(\&#039;&#039; . $this-&amp;gt;id . &#039;\&#039;); return false;&amp;quot;&amp;gt;&#039;&lt;br /&gt;
			. &#039;&amp;lt;span class=&amp;quot;icon-remove&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#039; . JText::_(&#039;JCLEAR&#039;)&lt;br /&gt;
			. &#039;&amp;lt;/a&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
		$html .= &#039;&amp;lt;/span&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
		// url for the iframe&lt;br /&gt;
		$linkHelloworlds = &#039;index.php?option=com_helloworld&amp;amp;amp;view=helloworlds&amp;amp;amp;layout=modal&amp;amp;amp;tmpl=component&amp;amp;amp;&#039; . JSession::getFormToken() . &#039;=1&#039;;&lt;br /&gt;
		$urlSelect = $linkHelloworlds . &#039;&amp;amp;amp;function=jSelectHelloworld_&#039; . $this-&amp;gt;id;&lt;br /&gt;
        &lt;br /&gt;
		// title to go in the modal header&lt;br /&gt;
		$modalTitle    = JText::_(&#039;COM_HELLOWORLD_MENUITEM_SELECT_MODAL_TITLE&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// html to set up the modal iframe&lt;br /&gt;
		$html .= JHtml::_(&lt;br /&gt;
			&#039;bootstrap.renderModal&#039;,&lt;br /&gt;
			&#039;ModalSelect&#039; . $modalId,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;title&#039;       =&amp;gt; $modalTitle,&lt;br /&gt;
				&#039;url&#039;         =&amp;gt; $urlSelect,&lt;br /&gt;
				&#039;height&#039;      =&amp;gt; &#039;400px&#039;,&lt;br /&gt;
				&#039;width&#039;       =&amp;gt; &#039;800px&#039;,&lt;br /&gt;
				&#039;bodyHeight&#039;  =&amp;gt; &#039;70&#039;,&lt;br /&gt;
				&#039;modalWidth&#039;  =&amp;gt; &#039;80&#039;,&lt;br /&gt;
				&#039;footer&#039;      =&amp;gt; &#039;&amp;lt;a role=&amp;quot;button&amp;quot; class=&amp;quot;btn&amp;quot; data-dismiss=&amp;quot;modal&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&#039; . JText::_(&#039;JLIB_HTML_BEHAVIOR_CLOSE&#039;) . &#039;&amp;lt;/a&amp;gt;&#039;,&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// class=&#039;required&#039; for client side validation.&lt;br /&gt;
		$class = $this-&amp;gt;required ? &#039; class=&amp;quot;required modal-value&amp;quot;&#039; : &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
		// hidden input field to store the helloworld record id&lt;br /&gt;
		$html .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; id=&amp;quot;&#039; . $this-&amp;gt;id . &#039;_id&amp;quot; &#039; . $class &lt;br /&gt;
			. &#039; data-required=&amp;quot;&#039; . (int) $this-&amp;gt;required . &#039;&amp;quot; name=&amp;quot;&#039; . $this-&amp;gt;name&lt;br /&gt;
			. &#039;&amp;quot; data-text=&amp;quot;&#039; . htmlspecialchars(JText::_(&#039;COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD&#039;, true), ENT_COMPAT, &#039;UTF-8&#039;) &lt;br /&gt;
			. &#039;&amp;quot; value=&amp;quot;&#039; . $value . &#039;&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
		return $html;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the html for the label field.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  string  The field label html.&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getLabel()&lt;br /&gt;
	{&lt;br /&gt;
		return str_replace($this-&amp;gt;id, $this-&amp;gt;id . &#039;_id&#039;, parent::getLabel());&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
When the field definition class extends JFormField, Joomla expects 2 methods to be present in the class: getInput() which should return the html for the input field elements and getLabel() which should return the html for the label. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
There are several core Joomla components which use modal fields to allow the administrator to select items, including com_content and com_contact. These components have similar field definitions, and the file above is a cut-down version of these equivalents, just supporting the functionality which we need for this tutorial step.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
There are a number of key html input elements returned by the getInput() method above.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
# The input field which displays the current greeting selected, or the text &amp;quot;Select&amp;quot; if none has been selected&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
# The Select button - this appears if no greeting has been selected. Note the attribute data-toggle=&amp;quot;modal&amp;quot; indicating that clicking on this button will cause the modal to appear&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
# The Clear button - this appears if a greeting has been selected. When clicked it runs a javascript function within the system/modal-fields.js code which replaces the selected greeting the &amp;quot;Select&amp;quot; text, makes visible the Select button, and hides the Clear button&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
# The modal elements - these are output through including sections of the Bootstrap html and javascript code. When the modal appears the iframe is created and populated through an HTTP GET to the URL in &amp;lt;tt&amp;gt;$urlSelect&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
# A hidden field which stores the id of the helloworld record selected, and which will be used to pass it in the HTTP POST parameters when the form is submitted. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
In our case the callback function will be called &amp;lt;tt&amp;gt;jSelectHelloworld_jform_request_id&amp;lt;/tt&amp;gt;, and this is the function we want to be called from the modal to pass the id and greeting of the selected helloworld record. Knowing this, &amp;lt;tt&amp;gt;window.processModalSelect&amp;lt;/tt&amp;gt; will set the input fields for the greeting and id, and set the visibility of the Select and Clear buttons. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
The modal knows that this is the name of the function to call because it&#039;s passed as the &amp;lt;tt&amp;gt;&amp;amp;function=jSelectHelloworld_jform_request_id&amp;lt;/tt&amp;gt; parameter within the URL of the iframe.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Note also the &amp;lt;tt&amp;gt;&amp;amp;tmpl=component&amp;lt;/tt&amp;gt; parameter in the URL. This means that the component.php file within the directory of the installed template will be used, which presents an html page without the Joomla menus, etc. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Modal Display == &amp;lt;!--T:41--&amp;gt; &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
For the modal display we use the same MVC as the admin &amp;quot;helloworlds&amp;quot; functionality. Neither the controller nor model require changing, there is a small change to the view file, and there&#039;s a new layout file, which is similar to the default.php layout file, but differs in some important respects.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
In the view file, we don&#039;t display the toolbar buttons nor the sidebar to choose between Messages and Categories (and some old comments have been removed as well).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;50-55&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items			= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination		= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state			= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Set the sidebar submenu and toolbar, but not on the modal window&lt;br /&gt;
		if ($this-&amp;gt;getLayout() !== &#039;modal&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
			$this-&amp;gt;addToolBar();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
Our new modal layout file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/modal.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/modal.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Layout file for the admin modal display of helloworld records&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\Registry\Registry;&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;behavior.core&#039;);&lt;br /&gt;
JHtml::_(&#039;script&#039;, &#039;com_helloworld/admin-helloworlds-modal.js&#039;, array(&#039;version&#039; =&amp;gt; &#039;auto&#039;, &#039;relative&#039; =&amp;gt; true));&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
&lt;br /&gt;
$app = JFactory::getApplication();&lt;br /&gt;
$function  = $app-&amp;gt;input-&amp;gt;getCmd(&#039;function&#039;, &#039;jSelectHelloworld&#039;);&lt;br /&gt;
$onclick   = $this-&amp;gt;escape($function);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;container-popup&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;amp;layout=modal&amp;amp;tmpl=component&amp;amp;function=&#039; . $function . &#039;&amp;amp;&#039; . JSession::getFormToken() . &#039;=1&#039;); ?&amp;gt;&amp;quot; method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;?php echo JLayoutHelper::render(&#039;joomla.searchtools.default&#039;, array(&#039;view&#039; =&amp;gt; $this)); ?&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;div class=&amp;quot;clearfix&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;3%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;15%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;15%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_POSITION&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;15%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_IMAGE&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;15%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;15%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_LANGUAGE&#039;, &#039;language&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;15%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $row-&amp;gt;image = new Registry;&lt;br /&gt;
                        $row-&amp;gt;image-&amp;gt;loadString($row-&amp;gt;imageInfo);&lt;br /&gt;
                        if ($row-&amp;gt;language &amp;amp;&amp;amp; JLanguageMultilang::isEnabled())&lt;br /&gt;
                        {&lt;br /&gt;
                            $tag = strlen($row-&amp;gt;language);&lt;br /&gt;
                            if ($tag == 5)&lt;br /&gt;
                            {&lt;br /&gt;
                                $lang = substr($row-&amp;gt;language, 0, 2);&lt;br /&gt;
                            }&lt;br /&gt;
                            elseif ($tag == 6)&lt;br /&gt;
                            {&lt;br /&gt;
                                $lang = substr($row-&amp;gt;language, 0, 3);&lt;br /&gt;
                            }&lt;br /&gt;
                            else {&lt;br /&gt;
                                $lang = &#039;&#039;;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        elseif (!JLanguageMultilang::isEnabled())&lt;br /&gt;
                        {&lt;br /&gt;
                            $lang = &#039;&#039;;&lt;br /&gt;
                        }&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php &lt;br /&gt;
                                $link = &#039;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;amp;id=&#039; . $row-&amp;gt;id;&lt;br /&gt;
                                $attribs = &#039;data-function=&amp;quot;&#039; . $this-&amp;gt;escape($onclick) . &#039;&amp;quot;&#039;&lt;br /&gt;
								. &#039; data-id=&amp;quot;&#039; . $row-&amp;gt;id . &#039;&amp;quot;&#039;&lt;br /&gt;
								. &#039; data-title=&amp;quot;&#039; . $this-&amp;gt;escape(addslashes($row-&amp;gt;greeting)) . &#039;&amp;quot;&#039;&lt;br /&gt;
								. &#039; data-uri=&amp;quot;&#039; . $link . &#039;&amp;quot;&#039;&lt;br /&gt;
								. &#039; data-language=&amp;quot;&#039; . $this-&amp;gt;escape($lang) . &#039;&amp;quot;&#039;&lt;br /&gt;
                                ;&lt;br /&gt;
                                ?&amp;gt;&lt;br /&gt;
                                &amp;lt;a class=&amp;quot;select-link&amp;quot; href=&amp;quot;javascript:void(0)&amp;quot; &amp;lt;?php echo $attribs; ?&amp;gt;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $this-&amp;gt;escape($row-&amp;gt;greeting); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;small break-word&amp;quot;&amp;gt;&lt;br /&gt;
                                	&amp;lt;?php echo JText::sprintf(&#039;JGLOBAL_LIST_ALIAS&#039;, $this-&amp;gt;escape($row-&amp;gt;alias)); ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
									&amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
								&amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo &amp;quot;[&amp;quot; . $row-&amp;gt;latitude . &amp;quot;, &amp;quot; . $row-&amp;gt;longitude . &amp;quot;]&amp;quot;; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php&lt;br /&gt;
                                    $caption = $row-&amp;gt;image-&amp;gt;get(&#039;caption&#039;) ? : &#039;&#039; ;&lt;br /&gt;
                                    $src = JURI::root() . ($row-&amp;gt;image-&amp;gt;get(&#039;image&#039;) ? : &#039;&#039; );&lt;br /&gt;
                                    $html = &#039;&amp;lt;p class=&amp;quot;hasTooltip&amp;quot; style=&amp;quot;display: inline-block&amp;quot; data-html=&amp;quot;true&amp;quot; data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;&amp;lt;img width=\&#039;100px\&#039; height=\&#039;100px\&#039; src=\&#039;%s\&#039;&amp;gt;&amp;quot;&amp;gt;%s&amp;lt;/p&amp;gt;&#039;;&lt;br /&gt;
                                    echo sprintf($html, $src, $caption);  ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JLayoutHelper::render(&#039;joomla.content.language&#039;, $row); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
Note that there are some important differences from the default.php layout file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
# We get the &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; parameter which is embedded in the iframe URL as a query parameter, and we use this in the URL target of the &amp;lt;tt&amp;gt;&amp;lt;form&amp;gt;&amp;lt;/tt&amp;gt; element and in the &amp;lt;tt&amp;gt;data-function&amp;lt;/tt&amp;gt; attribute of the each greeting value. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
# There are several other data attributes associated with each greeting value; these will be used to pass this information to the parent window via the jSelectHelloworld_jform_request_id function call. Also, each greeting has a CSS class of &amp;quot;select-link&amp;quot;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
# We need to set the target URL of the &amp;lt;tt&amp;gt;&amp;lt;form&amp;gt;&amp;lt;/tt&amp;gt; to be the same as the URL of the iframe. This is because whenever the administrator uses the search / filter tools the form sends an HTTP request to that URL, and we need to ensure it&#039;s the same data that gets presented.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
Also, the checkboxes have been removed, as they are now irrelevant. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
In addition, we need a small javascript file which basically sets an onclick listener on each of the greetings (identified through having the class &amp;quot;select-link&amp;quot;), and calls the required function when triggered. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;media/js/admin-helloworlds-modal.js&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;media/js/admin-helloworlds-modal.js&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
(function() {&lt;br /&gt;
	&amp;quot;use strict&amp;quot;;&lt;br /&gt;
	/**&lt;br /&gt;
	 * Javascript to set up onclick listeners on the helloworld greetings&lt;br /&gt;
	 * When a greeting is clicked the listener invokes the function in the parent window&lt;br /&gt;
	 * which is given by the data-function attribute of the helloworld greeting html element&lt;br /&gt;
	 * In this way the identity of the helloworld record selected in the modal is passed to the field in the parent window&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	document.addEventListener(&#039;DOMContentLoaded&#039;, function(){&lt;br /&gt;
		&lt;br /&gt;
		var elements = document.querySelectorAll(&#039;.select-link&#039;);&lt;br /&gt;
&lt;br /&gt;
		for(var i = 0, l = elements.length; l&amp;gt;i; i++) {&lt;br /&gt;
			&lt;br /&gt;
			elements[i].addEventListener(&#039;click&#039;, function (event) {&lt;br /&gt;
				event.preventDefault();&lt;br /&gt;
				var functionName = event.target.getAttribute(&#039;data-function&#039;);&lt;br /&gt;
				window.parent[functionName](event.target.getAttribute(&#039;data-id&#039;), event.target.getAttribute(&#039;data-title&#039;), null, null, event.target.getAttribute(&#039;data-uri&#039;), event.target.getAttribute(&#039;data-language&#039;), null);&lt;br /&gt;
			})&lt;br /&gt;
		}&lt;br /&gt;
	});&lt;br /&gt;
})();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Updated Language Strings == &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;86-89&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE=&amp;quot;Language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_POSITION=&amp;quot;Position&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_LABEL=&amp;quot;Latitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LATITUDE_DESC=&amp;quot;Enter the position latitude, between -90 and +90 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_LABEL=&amp;quot;Longitude&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LONGITUDE_DESC=&amp;quot;Enter the position longitude, between -180 and +180 degrees&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_LANGUAGE_DESC=&amp;quot;Select the appropriate language&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_IMAGE_FIELDS=&amp;quot;Image details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_LABEL=&amp;quot;Select image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_IMAGE_DESC=&amp;quot;Select an image from the library, or upload a new one&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_LABEL=&amp;quot;Alt text&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_ALT_DESC=&amp;quot;Alternative text (if image cannot be displayed)&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_LABEL=&amp;quot;Caption&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTION_DESC=&amp;quot;Provide a caption for the image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_IMAGE=&amp;quot;Image&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_IMAGE=&amp;quot;Image info&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_ASC=&amp;quot;Language ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LANGUAGE_DESC=&amp;quot;Language descending&amp;quot;&lt;br /&gt;
; Helloworld menuitem - selecting a greeting via modal&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_MODAL_TITLE=&amp;quot;Select greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_HELLOWORLD=&amp;quot;Select&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENUITEM_SELECT_BUTTON_TOOLTIP=&amp;quot;Select a helloworld greeting&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the Component == &amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an install-uninstall-update script file#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/router.php|site/router.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/view.json.php|site/views/helloworld/view.json.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding AJAX#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/view.html.php|site/views/category/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/category/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/views/category/tmpl/default.php|site/views/category/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#site/views/category/tmpl/default.xml|site/views/category/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/models/category.php|site/models/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_alias#site/models/forms/filter_category.xml|site/models/forms/filter_category.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Using the language filter facility#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/route.php|site/helpers/route.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#site/helpers/category.php|site/helpers/category.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/sql/updates/mysql/0.0.17.sql|admin/sql/updates/mysql/0.0.17.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#admin/sql/updates/mysql/0.0.18.sql|admin/sql/updates/mysql/0.0.18.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/sql/updates/mysql/0.0.20.sql|admin/sql/updates/mysql/0.0.20.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/sql/updates/mysql/0.0.21.sql|admin/sql/updates/mysql/0.0.21.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/modal/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#admin/models/fields/modal/helloworld.php|admin/models/fields/modal/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_Image#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using the language filter facility#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#admin/views/helloworlds/tmpl/modal.php|admin/views/helloworlds/tmpl/modal.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_an_alias#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding a Modal#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding an alias#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/js/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an alias#media/js/openstreetmap.js|media/js/openstreetmap.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Modal#media/js/admin-helloworlds-modal.js|media/js/admin-helloworlds-modal.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/css/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding a Map#index.html|media/css/openstreetmap.css]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.22&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;router.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;js&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;css&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;fr-FR&amp;quot;&amp;gt;fr-FR/fr-FR.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Using the language filter facility|&amp;lt;translate&amp;gt;&amp;lt;!--T:55--&amp;gt; Prev: Using the language filter facility&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding Associations|&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt; Next: Adding Associations&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>ThiagoG</name></author>
	</entry>
</feed>