<?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=Vaco</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=Vaco"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Vaco"/>
	<updated>2026-05-14T07:37:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020596</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020596"/>
		<updated>2024-01-23T19:09:40Z</updated>

		<summary type="html">&lt;p&gt;Vaco: &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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;br /&gt;
Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; znajdduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; i będzie korzystać z klasy &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Załóżmy, że chcemy użyć wyimaginowanego widoku &#039;&#039;fluffy&#039;&#039;, który musiałbyś mieć:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039;, która znajduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. Widok będzie korzystał z &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Uwaga: rzeczywisty ekran widoku: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; jest również wymagany, aby ten przykład działał.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/19/pl&amp;diff=1020595</id>
		<title>Translations:Absolute Basics of How a Component Functions/19/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/19/pl&amp;diff=1020595"/>
		<updated>2024-01-23T19:09:38Z</updated>

		<summary type="html">&lt;p&gt;Vaco: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Załóżmy, że chcemy użyć wyimaginowanego widoku &#039;&#039;fluffy&#039;&#039;, który musiałbyś mieć:&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020594</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020594"/>
		<updated>2024-01-23T19:09:11Z</updated>

		<summary type="html">&lt;p&gt;Vaco: &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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;br /&gt;
Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; znajdduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; i będzie korzystać z klasy &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Załóżmy, że chcemy użyć wyimaginowanego widoku &amp;quot;puszystego&amp;quot;, który musiałbyś mieć:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039;, która znajduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. Widok będzie korzystał z &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Uwaga: rzeczywisty ekran widoku: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; jest również wymagany, aby ten przykład działał.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/20/pl&amp;diff=1020593</id>
		<title>Translations:Absolute Basics of How a Component Functions/20/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/20/pl&amp;diff=1020593"/>
		<updated>2024-01-23T19:09:07Z</updated>

		<summary type="html">&lt;p&gt;Vaco: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039;, która znajduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. Widok będzie korzystał z &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Uwaga: rzeczywisty ekran widoku: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; jest również wymagany, aby ten przykład działał.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020592</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020592"/>
		<updated>2024-01-23T19:02:40Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Klasa &amp;#039;&amp;#039;HelloWorldView&amp;#039;&amp;#039;Fluffy&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, która znajduje się w pliku &amp;#039;&amp;#039;site/views/&amp;#039;&amp;#039;fluffy&amp;#039;&amp;#039;/view.html.php&amp;#039;&amp;#039;. Widok będzie korzystał z &amp;#039;&amp;#039;HelloWorldModel&amp;#039;&amp;#039;Fluffy&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; w pliku &amp;#039;&amp;#039;...&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;br /&gt;
Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; znajdduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; i będzie korzystać z klasy &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Załóżmy, że chcemy użyć wyimaginowanego widoku &amp;quot;puszystego&amp;quot;, który musiałbyś mieć:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039;, która znajduje się w pliku &#039;&#039;site/views/&#039;&#039;fluffy&#039;&#039;/view.html.php&#039;&#039;. Widok będzie korzystał z &#039;&#039;HelloWorldModel&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;fluffy&#039;&#039;.php&#039;&#039;. Uwaga: rzeczywisty ekran widoku: &#039;&#039;site/views/&#039;&#039;fluffy&#039;&#039;/tmpl/default.php&#039;&#039; jest również wymagany, aby ten przykład działał.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/20/pl&amp;diff=1020591</id>
		<title>Translations:Absolute Basics of How a Component Functions/20/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/20/pl&amp;diff=1020591"/>
		<updated>2024-01-23T19:02:36Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Klasa &amp;#039;&amp;#039;HelloWorldView&amp;#039;&amp;#039;Fluffy&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, która znajduje się w pliku &amp;#039;&amp;#039;site/views/&amp;#039;&amp;#039;fluffy&amp;#039;&amp;#039;/view.html.php&amp;#039;&amp;#039;. Widok będzie korzystał z &amp;#039;&amp;#039;HelloWorldModel&amp;#039;&amp;#039;Fluffy&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; w pliku &amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Klasa &#039;&#039;HelloWorldView&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039;, która znajduje się w pliku &#039;&#039;site/views/&#039;&#039;fluffy&#039;&#039;/view.html.php&#039;&#039;. Widok będzie korzystał z &#039;&#039;HelloWorldModel&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;fluffy&#039;&#039;.php&#039;&#039;. Uwaga: rzeczywisty ekran widoku: &#039;&#039;site/views/&#039;&#039;fluffy&#039;&#039;/tmpl/default.php&#039;&#039; jest również wymagany, aby ten przykład działał.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020590</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020590"/>
		<updated>2024-01-23T19:01:09Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Załóżmy, że chcemy użyć wyimaginowanego widoku &amp;quot;puszystego&amp;quot;, który musiałbyś mieć:&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;br /&gt;
Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; znajdduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; i będzie korzystać z klasy &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Załóżmy, że chcemy użyć wyimaginowanego widoku &amp;quot;puszystego&amp;quot;, który musiałbyś mieć:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/19/pl&amp;diff=1020589</id>
		<title>Translations:Absolute Basics of How a Component Functions/19/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/19/pl&amp;diff=1020589"/>
		<updated>2024-01-23T19:01:06Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Załóżmy, że chcemy użyć wyimaginowanego widoku &amp;quot;puszystego&amp;quot;, który musiałbyś mieć:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Załóżmy, że chcemy użyć wyimaginowanego widoku &amp;quot;puszystego&amp;quot;, który musiałbyś mieć:&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020588</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020588"/>
		<updated>2024-01-23T19:00:31Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Klasa &amp;#039;&amp;#039;HelloWorldView&amp;#039;&amp;#039;&amp;#039;HelloWorld&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; znajdduje się w pliku &amp;#039;&amp;#039;site/views/&amp;#039;&amp;#039;&amp;#039;helloworld&amp;#039;&amp;#039;&amp;#039;/view.html.php&amp;#039;&amp;#039; i będzie korzystać z klasy &amp;#039;&amp;#039;HelloWorldModel&amp;#039;&amp;#039;&amp;#039;HelloWorld&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;...&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;br /&gt;
Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&lt;br /&gt;
Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; znajdduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; i będzie korzystać z klasy &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/18/pl&amp;diff=1020587</id>
		<title>Translations:Absolute Basics of How a Component Functions/18/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/18/pl&amp;diff=1020587"/>
		<updated>2024-01-23T19:00:30Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Klasa &amp;#039;&amp;#039;HelloWorldView&amp;#039;&amp;#039;&amp;#039;HelloWorld&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; znajdduje się w pliku &amp;#039;&amp;#039;site/views/&amp;#039;&amp;#039;&amp;#039;helloworld&amp;#039;&amp;#039;&amp;#039;/view.html.php&amp;#039;&amp;#039; i będzie korzystać z klasy &amp;#039;&amp;#039;HelloWorldModel&amp;#039;&amp;#039;&amp;#039;HelloWorld&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Klasa &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; znajdduje się w pliku &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; i będzie korzystać z klasy &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; w pliku &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020586</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020586"/>
		<updated>2024-01-23T18:58:00Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;br /&gt;
Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/17/pl&amp;diff=1020585</id>
		<title>Translations:Absolute Basics of How a Component Functions/17/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/17/pl&amp;diff=1020585"/>
		<updated>2024-01-23T18:57:58Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Przyjrzyjmy się więc konwencjom nazewnictwa na przykładzie, ponieważ konwencje nazewnictwa są prawdziwą magią, która sprawia, że wszystko działa:&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020584</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020584"/>
		<updated>2024-01-23T18:57:45Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołuj...&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/16/pl&amp;diff=1020583</id>
		<title>Translations:Absolute Basics of How a Component Functions/16/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/16/pl&amp;diff=1020583"/>
		<updated>2024-01-23T18:57:41Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołuj...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We frameworku Joomla modele są odpowiedzialne za zarządzanie danymi. Pierwszą funkcją, którą należy napisać dla modelu, jest funkcja &amp;quot;get&amp;quot;. Zwraca ona dane do wywołującego. W tym przykładzie wywołującym będzie widok &#039;&#039;HelloWorldViewHelloWorld&#039;&#039;. Domyślnie model o nazwie &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; znajdujący się w &#039;&#039;site/models/helloworld.php&#039;&#039; jest głównym modelem powiązanym z tym widokiem.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/15/pl&amp;diff=1020582</id>
		<title>Translations:Absolute Basics of How a Component Functions/15/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/15/pl&amp;diff=1020582"/>
		<updated>2024-01-23T18:57:13Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;=== Model ===&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Model ===&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020581</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020581"/>
		<updated>2024-01-23T18:57:08Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;== Wyjaśnienie struktury komponentów Joomla! ==&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Wyjaśnienie struktury komponentów Joomla! ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/14/pl&amp;diff=1020580</id>
		<title>Translations:Absolute Basics of How a Component Functions/14/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/14/pl&amp;diff=1020580"/>
		<updated>2024-01-23T18:57:06Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;== Wyjaśnienie struktury komponentów Joomla! ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Wyjaśnienie struktury komponentów Joomla! ==&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020579</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020579"/>
		<updated>2024-01-23T18:56:54Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler okre...&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/13/pl&amp;diff=1020578</id>
		<title>Translations:Absolute Basics of How a Component Functions/13/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/13/pl&amp;diff=1020578"/>
		<updated>2024-01-23T18:56:53Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler okre...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kontroler jest odpowiedzialny za reagowanie na działania użytkownika. W przypadku aplikacji internetowej, akcją użytkownika jest zazwyczaj żądanie strony. Kontroler określi, jakie żądanie jest wykonywane przez użytkownika i odpowiednio zareaguje, uruchamiając model w celu odpowiedniego manipulowania danymi i przekazując model do widoku. Kontroler nie wyświetla danych w modelu, a jedynie uruchamia metody w modelu, które modyfikują dane, a następnie przekazuje model do widoku, który wyświetla dane.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020577</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020577"/>
		<updated>2024-01-23T18:56:21Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;===Kontroler===&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Kontroler===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/12/pl&amp;diff=1020576</id>
		<title>Translations:Absolute Basics of How a Component Functions/12/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/12/pl&amp;diff=1020576"/>
		<updated>2024-01-23T18:56:18Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;===Kontroler===&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Kontroler===&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020575</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020575"/>
		<updated>2024-01-23T18:56:14Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby z...&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/11/pl&amp;diff=1020574</id>
		<title>Translations:Absolute Basics of How a Component Functions/11/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/11/pl&amp;diff=1020574"/>
		<updated>2024-01-23T18:56:11Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby z...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Widok jest częścią komponentu, która służy do renderowania danych z modelu w sposób odpowiedni do interakcji. W przypadku aplikacji opartej na sieci Web, widok byłby zazwyczaj stroną HTML, która jest zwracana użytkownikowi. Widok pobiera dane z modelu (które są przekazywane do niego z kontrolera) i przekazuje je do szablonu, który jest wypełniany i prezentowany użytkownikowi. Widok nie powoduje modyfikacji danych w żaden sposób, wyświetla jedynie dane otrzymane z modelu.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020573</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020573"/>
		<updated>2024-01-23T18:55:39Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;===Widok===&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===Widok===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/10/pl&amp;diff=1020572</id>
		<title>Translations:Absolute Basics of How a Component Functions/10/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/10/pl&amp;diff=1020572"/>
		<updated>2024-01-23T18:55:35Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;===Widok===&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Widok===&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020571</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020571"/>
		<updated>2024-01-23T18:54:47Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur,...&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/9/pl&amp;diff=1020570</id>
		<title>Translations:Absolute Basics of How a Component Functions/9/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/9/pl&amp;diff=1020570"/>
		<updated>2024-01-23T18:54:47Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Model jest częścią komponentu, która hermetyzuje dane aplikacji. Często zapewnia procedury zarządzania i manipulowania tymi danymi w znaczący sposób, oprócz procedur, które pobierają dane z modelu. Ogólnie rzecz biorąc, podstawowa technika dostępu do danych powinna być zamknięta w modelu. W ten sposób, jeśli aplikacja ma zostać przeniesiona z systemu wykorzystującego płaski plik do przechowywania informacji do systemu wykorzystującego bazę danych, model jest jedynym elementem, który należy zmienić, a nie widok lub kontroler.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020569</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020569"/>
		<updated>2024-01-23T18:54:28Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;===Model===&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to a system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/8/pl&amp;diff=1020568</id>
		<title>Translations:Absolute Basics of How a Component Functions/8/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/8/pl&amp;diff=1020568"/>
		<updated>2024-01-23T18:54:28Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;===Model===&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Model===&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/7/pl&amp;diff=1020567</id>
		<title>Translations:Absolute Basics of How a Component Functions/7/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/7/pl&amp;diff=1020567"/>
		<updated>2024-01-23T18:53:46Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeni...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MVC to wzorzec projektowy oprogramowania, który może być używany do organizowania kodu w taki sposób, że logika biznesowa i prezentacja danych są oddzielone. Założeniem tego podejścia jest to, że jeśli logika biznesowa jest zgrupowana w jednej sekcji, to interfejs i interakcja użytkownika, które otaczają dane, mogą być zmieniane i dostosowywane bez konieczności przeprogramowywania logiki biznesowej. MVC został pierwotnie opracowany w celu odwzorowania tradycyjnych ról wejścia, przetwarzania i wyjścia w logiczną architekturę GUI.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020566</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020566"/>
		<updated>2024-01-23T18:52:40Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;==Wprowadzenie do MVC==&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Wprowadzenie do MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are separate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to a system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/6/pl&amp;diff=1020565</id>
		<title>Translations:Absolute Basics of How a Component Functions/6/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/6/pl&amp;diff=1020565"/>
		<updated>2024-01-23T18:52:37Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;==Wprowadzenie do MVC==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Wprowadzenie do MVC==&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020564</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020564"/>
		<updated>2024-01-23T18:52:24Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej...&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;br /&gt;
==Introduction to MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are separate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to a system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/5/pl&amp;diff=1020563</id>
		<title>Translations:Absolute Basics of How a Component Functions/5/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/5/pl&amp;diff=1020563"/>
		<updated>2024-01-23T18:52:23Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We frameworku Joomla! komponenty mogą być projektowane przy użyciu płaskiego modelu (zwraca kod HTML dla żądanej strony) lub wzorca Model-Widok-Kontroler (zwanego dalej MVC).&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/58/pl&amp;diff=1020562</id>
		<title>Translations:Absolute Basics of How a Component Functions/58/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/58/pl&amp;diff=1020562"/>
		<updated>2024-01-23T18:51:01Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;en&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;en&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020561</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020561"/>
		<updated>2024-01-23T18:50:59Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;==Czym jest komponent Joomlaǃ?==&amp;quot;&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;
Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;br /&gt;
==Czym jest komponent Joomlaǃ?==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
In the Joomla! framework, components can be designed using a flat model (returns HTML code for the requested page) or Model-View-Controller (herein referred to as MVC) pattern.&lt;br /&gt;
==Introduction to MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are separate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to a system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/2/pl&amp;diff=1020560</id>
		<title>Translations:Absolute Basics of How a Component Functions/2/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/2/pl&amp;diff=1020560"/>
		<updated>2024-01-23T18:50:56Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;==Czym jest komponent Joomlaǃ?==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Czym jest komponent Joomlaǃ?==&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/1/pl&amp;diff=1020559</id>
		<title>Translations:Absolute Basics of How a Component Functions/1/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/1/pl&amp;diff=1020559"/>
		<updated>2024-01-23T18:50:46Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład kompo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ten artykuł jest przeznaczony dla początkujących użytkowników Joomlaǃ; ma na celu wyjaśnienie, czym jest komponent Joomlaǃ i jak działa. Gdy konkretny przykład komponentu będzie przydatny w samouczku, artykuł ten będzie odnosił się do przykładowego komponentu o nazwie Hello Worldǃ.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020558</id>
		<title>Absolute Basics of How a Component Functions/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions/pl&amp;diff=1020558"/>
		<updated>2024-01-23T18:49:07Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Absolutne podstawy działania komponentów&amp;quot;&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;
This article is designed for Joomlaǃ beginners; it is designed to explain what a Joomlaǃ component is and how it functions. When a specific component example will benefit the tutorial, this article will refer to an example component named Hello Worldǃ.&lt;br /&gt;
==What is a Joomlaǃ Component==&lt;br /&gt;
{{Chunk:Component/en}}&lt;br /&gt;
In the Joomla! framework, components can be designed using a flat model (returns HTML code for the requested page) or Model-View-Controller (herein referred to as MVC) pattern.&lt;br /&gt;
==Introduction to MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are separate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to a system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. For this example, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic that make everything work:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&lt;br /&gt;
Let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php&#039;&#039;&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access&lt;br /&gt;
 | &#039;&#039;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&#039;&#039;&lt;br /&gt;
 |}&lt;br /&gt;
Hello World! example: &#039;&#039;localhost/joomla/index.php?option=com_helloworld&#039;&#039;&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_&amp;lt;component_name&amp;gt;/&#039;&#039; .&lt;br /&gt;
The Hello World! component would be stored in &#039;&#039;htdocs/&amp;lt;path_to_joomla&amp;gt;/components/com_helloworld/&#039;&#039;.&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*An HTML file that is just a security file with a background colorː &#039;&#039;index.html&#039;&#039;&lt;br /&gt;
*A PHP file that represents the controller itselfː &#039;&#039;controller.php&#039;&#039;&lt;br /&gt;
*A PHP file that loads the controller classː &#039;&#039;&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*A PHP file that represents the model itselfː &#039;&#039;models/&amp;lt;component_name&amp;gt;.php&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;models/index.html&#039;&#039;&lt;br /&gt;
*A PHP file containing the default viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&#039;&#039;&lt;br /&gt;
*An XML file for adding a menu item typeː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&#039;&#039;&lt;br /&gt;
*Another HTML file for background controlː &#039;&#039;views/&amp;lt;component_name&amp;gt;/index.html&#039;&#039;&lt;br /&gt;
*A PHP file for displaying the viewː &#039;&#039;views/&amp;lt;component_name&amp;gt;/view.html.php&#039;&#039;&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; line&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;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This enables a secure entry point into the Joomla! platform. [[S:MyLanguage/JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[S:MyLanguage/J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[S:MyLanguage/J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
* [[S:MyLanguage/J4.x:Developing_an_MVC_Component| Joomla! 4.x]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Explanations{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/Page_display_title/pl&amp;diff=1020557</id>
		<title>Translations:Absolute Basics of How a Component Functions/Page display title/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Absolute_Basics_of_How_a_Component_Functions/Page_display_title/pl&amp;diff=1020557"/>
		<updated>2024-01-23T18:49:00Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Absolutne podstawy działania komponentów&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Absolutne podstawy działania komponentów&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020556</id>
		<title>J4.x:Developing an MVC Component/Introduction/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020556"/>
		<updated>2024-01-23T18:43:53Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Category:Joomla!_4.x Category:Beginner Development Category:Component Development Category:Tutorials Category:Tutorials in a Series Category:Development{...&amp;quot;&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;
{{Joomla version|version=4.x|comment=&amp;gt;Tutorial}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Top portal heading|color=white-bkgd|icon=file-code-o|icon-color=#5091cd|size=5x|text-color=#333|title=Tworzenie komponentu MVC dla Joomla 4.x}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Chunk:Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!4.x_-_Contents/en}}&lt;br /&gt;
&lt;br /&gt;
Ten samouczek nauczy Cię, jak stworzyć komponent dla Joomla 4.x. Komponent to rodzaj rozszerzenia Joomla, które udostępnia użytkownikowi własne strony, zamiast rozszerzać istniejącą zawartość. Komponent jest najpotężniejszym typem rozszerzenia Joomla, zdolnym do dodania dużej ilości nowych funkcji do witryny.&lt;br /&gt;
&lt;br /&gt;
Komponenty Joomla są podzielone na dwie główne części: część administratora i część witryny. Część administratora zapewnia interfejs do zarządzania komponentem, a część witryny zapewnia strony żądane przez użytkowników odwiedzających witrynę. W tym poradniku dowiesz się, jak zbudować obie części.&lt;br /&gt;
&lt;br /&gt;
Bardziej szczegółowy przegląd komponentów i używanego przez nie wzorca projektowego Model-View-Controller można znaleźć w artykule [[S:MyLanguage/Absolute_Basics_of_How_a_Component_Functions|Przewodnik po podstawach komponentów]]. Należy jednak pamiętać, że specyficzna struktura plików, standardy nazewnictwa i kod wyszczególnione w przewodniku odnoszą się do Joomla 3.x i powinny zostać zignorowane na potrzeby tego samouczka.&lt;br /&gt;
&lt;br /&gt;
== Wymagania ==&lt;br /&gt;
&lt;br /&gt;
Będziesz potrzebował Joomla 4.x do tego samouczka. Programowanie dla Joomla 4.x wymaga: &lt;br /&gt;
&lt;br /&gt;
* Minimalna wersja PHP 7.2.5 do zainstalowania&lt;br /&gt;
* Composer, do zarządzania zależnościami PHP&lt;br /&gt;
* NodeJS w wersji 10 lub nowszej do zarządzania zależnościami front-endu&lt;br /&gt;
* Baza danych MySQL w wersji 5.6 lub wyższej &#039;&#039;&#039;lub&#039;&#039;&#039;&lt;br /&gt;
* Baza danych PostgreSQL w wersji 11 lub wyższej&lt;br /&gt;
* System kontroli wersji Git&lt;br /&gt;
&lt;br /&gt;
Jeśli nie skonfigurowałeś lokalnego środowiska programistycznego, musisz to zrobić przed przystąpieniem do tego samouczka. Aby skonfigurować lokalne środowisko programistyczne, zapoznaj się z sekcją [[S:MyLanguage/J4.x:Setting_Up_Your_Local_Environment|Przewodnik po środowisku lokalnym]].&lt;br /&gt;
&lt;br /&gt;
== Migracja z Joomla 3.x ==&lt;br /&gt;
&lt;br /&gt;
W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesienie plików. Autor zamierza stworzyć przewodnik migracji po ukończeniu tego samouczka, który zostanie tutaj połączony.&lt;br /&gt;
&lt;br /&gt;
== Współtwórcy ==&lt;br /&gt;
* [[User:Ribafs|Ribafs]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:Kevinkabatra | Kevin Kabatra]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:GregJPreece | Greg J Preece]] (Rewriting 3.x guide for 4.x)&lt;br /&gt;
* [[User:PBaxter | Peter Baxter]] ()&lt;br /&gt;
* [[User:sayfrndship | Abdul waheed]] (Joomla 4.x component development)&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/J4.x:Developing_an_MVC_Component|Prev: Overview|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/J4.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Next: Developing a Basic Component|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla!_4.x]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
[[Category:Development{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.0{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/14/pl&amp;diff=1020555</id>
		<title>Translations:J4.x:Developing an MVC Component/Introduction/14/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/14/pl&amp;diff=1020555"/>
		<updated>2024-01-23T18:43:48Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;Category:Joomla!_4.x Category:Beginner Development Category:Component Development Category:Tutorials Category:Tutorials in a Series Category:Development{...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Joomla!_4.x]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
[[Category:Development{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.0{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020554</id>
		<title>J4.x:Developing an MVC Component/Introduction/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020554"/>
		<updated>2024-01-23T18:43:42Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button| S:MyLanguage/J4.x:Developing_an_MVC_Component|Prev: Overview|class=expand success}}&amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;large-6 co...&amp;quot;&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;
{{Joomla version|version=4.x|comment=&amp;gt;Tutorial}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Top portal heading|color=white-bkgd|icon=file-code-o|icon-color=#5091cd|size=5x|text-color=#333|title=Tworzenie komponentu MVC dla Joomla 4.x}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Chunk:Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!4.x_-_Contents/en}}&lt;br /&gt;
&lt;br /&gt;
Ten samouczek nauczy Cię, jak stworzyć komponent dla Joomla 4.x. Komponent to rodzaj rozszerzenia Joomla, które udostępnia użytkownikowi własne strony, zamiast rozszerzać istniejącą zawartość. Komponent jest najpotężniejszym typem rozszerzenia Joomla, zdolnym do dodania dużej ilości nowych funkcji do witryny.&lt;br /&gt;
&lt;br /&gt;
Komponenty Joomla są podzielone na dwie główne części: część administratora i część witryny. Część administratora zapewnia interfejs do zarządzania komponentem, a część witryny zapewnia strony żądane przez użytkowników odwiedzających witrynę. W tym poradniku dowiesz się, jak zbudować obie części.&lt;br /&gt;
&lt;br /&gt;
Bardziej szczegółowy przegląd komponentów i używanego przez nie wzorca projektowego Model-View-Controller można znaleźć w artykule [[S:MyLanguage/Absolute_Basics_of_How_a_Component_Functions|Przewodnik po podstawach komponentów]]. Należy jednak pamiętać, że specyficzna struktura plików, standardy nazewnictwa i kod wyszczególnione w przewodniku odnoszą się do Joomla 3.x i powinny zostać zignorowane na potrzeby tego samouczka.&lt;br /&gt;
&lt;br /&gt;
== Wymagania ==&lt;br /&gt;
&lt;br /&gt;
Będziesz potrzebował Joomla 4.x do tego samouczka. Programowanie dla Joomla 4.x wymaga: &lt;br /&gt;
&lt;br /&gt;
* Minimalna wersja PHP 7.2.5 do zainstalowania&lt;br /&gt;
* Composer, do zarządzania zależnościami PHP&lt;br /&gt;
* NodeJS w wersji 10 lub nowszej do zarządzania zależnościami front-endu&lt;br /&gt;
* Baza danych MySQL w wersji 5.6 lub wyższej &#039;&#039;&#039;lub&#039;&#039;&#039;&lt;br /&gt;
* Baza danych PostgreSQL w wersji 11 lub wyższej&lt;br /&gt;
* System kontroli wersji Git&lt;br /&gt;
&lt;br /&gt;
Jeśli nie skonfigurowałeś lokalnego środowiska programistycznego, musisz to zrobić przed przystąpieniem do tego samouczka. Aby skonfigurować lokalne środowisko programistyczne, zapoznaj się z sekcją [[S:MyLanguage/J4.x:Setting_Up_Your_Local_Environment|Przewodnik po środowisku lokalnym]].&lt;br /&gt;
&lt;br /&gt;
== Migracja z Joomla 3.x ==&lt;br /&gt;
&lt;br /&gt;
W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesienie plików. Autor zamierza stworzyć przewodnik migracji po ukończeniu tego samouczka, który zostanie tutaj połączony.&lt;br /&gt;
&lt;br /&gt;
== Współtwórcy ==&lt;br /&gt;
* [[User:Ribafs|Ribafs]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:Kevinkabatra | Kevin Kabatra]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:GregJPreece | Greg J Preece]] (Rewriting 3.x guide for 4.x)&lt;br /&gt;
* [[User:PBaxter | Peter Baxter]] ()&lt;br /&gt;
* [[User:sayfrndship | Abdul waheed]] (Joomla 4.x component development)&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/J4.x:Developing_an_MVC_Component|Prev: Overview|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/J4.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Next: Developing a Basic Component|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Joomla!_4.x]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
[[Category:Development{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.0{{#translation:}}]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/16/pl&amp;diff=1020553</id>
		<title>Translations:J4.x:Developing an MVC Component/Introduction/16/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/16/pl&amp;diff=1020553"/>
		<updated>2024-01-23T18:43:40Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button| S:MyLanguage/J4.x:Developing_an_MVC_Component|Prev: Overview|class=expand success}}&amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;large-6 co...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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/J4.x:Developing_an_MVC_Component|Prev: Overview|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/J4.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Next: Developing a Basic Component|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020552</id>
		<title>J4.x:Developing an MVC Component/Introduction/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020552"/>
		<updated>2024-01-23T18:43:31Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;* Ribafs (Authored Joomla 3.x version) *  Kevin Kabatra (Authored Joomla 3.x version) *  Greg J Preece (Rewriting...&amp;quot;&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;
{{Joomla version|version=4.x|comment=&amp;gt;Tutorial}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Top portal heading|color=white-bkgd|icon=file-code-o|icon-color=#5091cd|size=5x|text-color=#333|title=Tworzenie komponentu MVC dla Joomla 4.x}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Chunk:Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!4.x_-_Contents/en}}&lt;br /&gt;
&lt;br /&gt;
Ten samouczek nauczy Cię, jak stworzyć komponent dla Joomla 4.x. Komponent to rodzaj rozszerzenia Joomla, które udostępnia użytkownikowi własne strony, zamiast rozszerzać istniejącą zawartość. Komponent jest najpotężniejszym typem rozszerzenia Joomla, zdolnym do dodania dużej ilości nowych funkcji do witryny.&lt;br /&gt;
&lt;br /&gt;
Komponenty Joomla są podzielone na dwie główne części: część administratora i część witryny. Część administratora zapewnia interfejs do zarządzania komponentem, a część witryny zapewnia strony żądane przez użytkowników odwiedzających witrynę. W tym poradniku dowiesz się, jak zbudować obie części.&lt;br /&gt;
&lt;br /&gt;
Bardziej szczegółowy przegląd komponentów i używanego przez nie wzorca projektowego Model-View-Controller można znaleźć w artykule [[S:MyLanguage/Absolute_Basics_of_How_a_Component_Functions|Przewodnik po podstawach komponentów]]. Należy jednak pamiętać, że specyficzna struktura plików, standardy nazewnictwa i kod wyszczególnione w przewodniku odnoszą się do Joomla 3.x i powinny zostać zignorowane na potrzeby tego samouczka.&lt;br /&gt;
&lt;br /&gt;
== Wymagania ==&lt;br /&gt;
&lt;br /&gt;
Będziesz potrzebował Joomla 4.x do tego samouczka. Programowanie dla Joomla 4.x wymaga: &lt;br /&gt;
&lt;br /&gt;
* Minimalna wersja PHP 7.2.5 do zainstalowania&lt;br /&gt;
* Composer, do zarządzania zależnościami PHP&lt;br /&gt;
* NodeJS w wersji 10 lub nowszej do zarządzania zależnościami front-endu&lt;br /&gt;
* Baza danych MySQL w wersji 5.6 lub wyższej &#039;&#039;&#039;lub&#039;&#039;&#039;&lt;br /&gt;
* Baza danych PostgreSQL w wersji 11 lub wyższej&lt;br /&gt;
* System kontroli wersji Git&lt;br /&gt;
&lt;br /&gt;
Jeśli nie skonfigurowałeś lokalnego środowiska programistycznego, musisz to zrobić przed przystąpieniem do tego samouczka. Aby skonfigurować lokalne środowisko programistyczne, zapoznaj się z sekcją [[S:MyLanguage/J4.x:Setting_Up_Your_Local_Environment|Przewodnik po środowisku lokalnym]].&lt;br /&gt;
&lt;br /&gt;
== Migracja z Joomla 3.x ==&lt;br /&gt;
&lt;br /&gt;
W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesienie plików. Autor zamierza stworzyć przewodnik migracji po ukończeniu tego samouczka, który zostanie tutaj połączony.&lt;br /&gt;
&lt;br /&gt;
== Współtwórcy ==&lt;br /&gt;
* [[User:Ribafs|Ribafs]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:Kevinkabatra | Kevin Kabatra]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:GregJPreece | Greg J Preece]] (Rewriting 3.x guide for 4.x)&lt;br /&gt;
* [[User:PBaxter | Peter Baxter]] ()&lt;br /&gt;
* [[User:sayfrndship | Abdul waheed]] (Joomla 4.x component development)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;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/J4.x:Developing_an_MVC_Component|Prev: Overview|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/J4.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Next: Developing a Basic Component|class=expand}}&amp;lt;/div&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;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Joomla!_4.x]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
[[Category:Development{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.0{{#translation:}}]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/11/pl&amp;diff=1020551</id>
		<title>Translations:J4.x:Developing an MVC Component/Introduction/11/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/11/pl&amp;diff=1020551"/>
		<updated>2024-01-23T18:43:28Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;* Ribafs (Authored Joomla 3.x version) *  Kevin Kabatra (Authored Joomla 3.x version) *  Greg J Preece (Rewriting...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[User:Ribafs|Ribafs]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:Kevinkabatra | Kevin Kabatra]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:GregJPreece | Greg J Preece]] (Rewriting 3.x guide for 4.x)&lt;br /&gt;
* [[User:PBaxter | Peter Baxter]] ()&lt;br /&gt;
* [[User:sayfrndship | Abdul waheed]] (Joomla 4.x component development)&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020550</id>
		<title>J4.x:Developing an MVC Component/Introduction/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020550"/>
		<updated>2024-01-23T18:43:19Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;== Współtwórcy ==&amp;quot;&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;
{{Joomla version|version=4.x|comment=&amp;gt;Tutorial}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Top portal heading|color=white-bkgd|icon=file-code-o|icon-color=#5091cd|size=5x|text-color=#333|title=Tworzenie komponentu MVC dla Joomla 4.x}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Chunk:Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!4.x_-_Contents/en}}&lt;br /&gt;
&lt;br /&gt;
Ten samouczek nauczy Cię, jak stworzyć komponent dla Joomla 4.x. Komponent to rodzaj rozszerzenia Joomla, które udostępnia użytkownikowi własne strony, zamiast rozszerzać istniejącą zawartość. Komponent jest najpotężniejszym typem rozszerzenia Joomla, zdolnym do dodania dużej ilości nowych funkcji do witryny.&lt;br /&gt;
&lt;br /&gt;
Komponenty Joomla są podzielone na dwie główne części: część administratora i część witryny. Część administratora zapewnia interfejs do zarządzania komponentem, a część witryny zapewnia strony żądane przez użytkowników odwiedzających witrynę. W tym poradniku dowiesz się, jak zbudować obie części.&lt;br /&gt;
&lt;br /&gt;
Bardziej szczegółowy przegląd komponentów i używanego przez nie wzorca projektowego Model-View-Controller można znaleźć w artykule [[S:MyLanguage/Absolute_Basics_of_How_a_Component_Functions|Przewodnik po podstawach komponentów]]. Należy jednak pamiętać, że specyficzna struktura plików, standardy nazewnictwa i kod wyszczególnione w przewodniku odnoszą się do Joomla 3.x i powinny zostać zignorowane na potrzeby tego samouczka.&lt;br /&gt;
&lt;br /&gt;
== Wymagania ==&lt;br /&gt;
&lt;br /&gt;
Będziesz potrzebował Joomla 4.x do tego samouczka. Programowanie dla Joomla 4.x wymaga: &lt;br /&gt;
&lt;br /&gt;
* Minimalna wersja PHP 7.2.5 do zainstalowania&lt;br /&gt;
* Composer, do zarządzania zależnościami PHP&lt;br /&gt;
* NodeJS w wersji 10 lub nowszej do zarządzania zależnościami front-endu&lt;br /&gt;
* Baza danych MySQL w wersji 5.6 lub wyższej &#039;&#039;&#039;lub&#039;&#039;&#039;&lt;br /&gt;
* Baza danych PostgreSQL w wersji 11 lub wyższej&lt;br /&gt;
* System kontroli wersji Git&lt;br /&gt;
&lt;br /&gt;
Jeśli nie skonfigurowałeś lokalnego środowiska programistycznego, musisz to zrobić przed przystąpieniem do tego samouczka. Aby skonfigurować lokalne środowisko programistyczne, zapoznaj się z sekcją [[S:MyLanguage/J4.x:Setting_Up_Your_Local_Environment|Przewodnik po środowisku lokalnym]].&lt;br /&gt;
&lt;br /&gt;
== Migracja z Joomla 3.x ==&lt;br /&gt;
&lt;br /&gt;
W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesienie plików. Autor zamierza stworzyć przewodnik migracji po ukończeniu tego samouczka, który zostanie tutaj połączony.&lt;br /&gt;
&lt;br /&gt;
== Współtwórcy ==&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;&lt;br /&gt;
* [[User:Ribafs|Ribafs]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:Kevinkabatra | Kevin Kabatra]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:GregJPreece | Greg J Preece]] (Rewriting 3.x guide for 4.x)&lt;br /&gt;
* [[User:PBaxter | Peter Baxter]] ()&lt;br /&gt;
* [[User:sayfrndship | Abdul waheed]] (Joomla 4.x component development)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;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/J4.x:Developing_an_MVC_Component|Prev: Overview|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/J4.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Next: Developing a Basic Component|class=expand}}&amp;lt;/div&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;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Joomla!_4.x]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
[[Category:Development{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.0{{#translation:}}]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/10/pl&amp;diff=1020549</id>
		<title>Translations:J4.x:Developing an MVC Component/Introduction/10/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/10/pl&amp;diff=1020549"/>
		<updated>2024-01-23T18:43:17Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;== Współtwórcy ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Współtwórcy ==&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020548</id>
		<title>J4.x:Developing an MVC Component/Introduction/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J4.x:Developing_an_MVC_Component/Introduction/pl&amp;diff=1020548"/>
		<updated>2024-01-23T18:43:05Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesi...&amp;quot;&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;
{{Joomla version|version=4.x|comment=&amp;gt;Tutorial}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Top portal heading|color=white-bkgd|icon=file-code-o|icon-color=#5091cd|size=5x|text-color=#333|title=Tworzenie komponentu MVC dla Joomla 4.x}}&lt;br /&gt;
{{-}}&lt;br /&gt;
{{Chunk:Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!4.x_-_Contents/en}}&lt;br /&gt;
&lt;br /&gt;
Ten samouczek nauczy Cię, jak stworzyć komponent dla Joomla 4.x. Komponent to rodzaj rozszerzenia Joomla, które udostępnia użytkownikowi własne strony, zamiast rozszerzać istniejącą zawartość. Komponent jest najpotężniejszym typem rozszerzenia Joomla, zdolnym do dodania dużej ilości nowych funkcji do witryny.&lt;br /&gt;
&lt;br /&gt;
Komponenty Joomla są podzielone na dwie główne części: część administratora i część witryny. Część administratora zapewnia interfejs do zarządzania komponentem, a część witryny zapewnia strony żądane przez użytkowników odwiedzających witrynę. W tym poradniku dowiesz się, jak zbudować obie części.&lt;br /&gt;
&lt;br /&gt;
Bardziej szczegółowy przegląd komponentów i używanego przez nie wzorca projektowego Model-View-Controller można znaleźć w artykule [[S:MyLanguage/Absolute_Basics_of_How_a_Component_Functions|Przewodnik po podstawach komponentów]]. Należy jednak pamiętać, że specyficzna struktura plików, standardy nazewnictwa i kod wyszczególnione w przewodniku odnoszą się do Joomla 3.x i powinny zostać zignorowane na potrzeby tego samouczka.&lt;br /&gt;
&lt;br /&gt;
== Wymagania ==&lt;br /&gt;
&lt;br /&gt;
Będziesz potrzebował Joomla 4.x do tego samouczka. Programowanie dla Joomla 4.x wymaga: &lt;br /&gt;
&lt;br /&gt;
* Minimalna wersja PHP 7.2.5 do zainstalowania&lt;br /&gt;
* Composer, do zarządzania zależnościami PHP&lt;br /&gt;
* NodeJS w wersji 10 lub nowszej do zarządzania zależnościami front-endu&lt;br /&gt;
* Baza danych MySQL w wersji 5.6 lub wyższej &#039;&#039;&#039;lub&#039;&#039;&#039;&lt;br /&gt;
* Baza danych PostgreSQL w wersji 11 lub wyższej&lt;br /&gt;
* System kontroli wersji Git&lt;br /&gt;
&lt;br /&gt;
Jeśli nie skonfigurowałeś lokalnego środowiska programistycznego, musisz to zrobić przed przystąpieniem do tego samouczka. Aby skonfigurować lokalne środowisko programistyczne, zapoznaj się z sekcją [[S:MyLanguage/J4.x:Setting_Up_Your_Local_Environment|Przewodnik po środowisku lokalnym]].&lt;br /&gt;
&lt;br /&gt;
== Migracja z Joomla 3.x ==&lt;br /&gt;
&lt;br /&gt;
W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesienie plików. Autor zamierza stworzyć przewodnik migracji po ukończeniu tego samouczka, który zostanie tutaj połączony.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;&lt;br /&gt;
== Contributors ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;&lt;br /&gt;
* [[User:Ribafs|Ribafs]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:Kevinkabatra | Kevin Kabatra]] (Authored Joomla 3.x version)&lt;br /&gt;
* [[User:GregJPreece | Greg J Preece]] (Rewriting 3.x guide for 4.x)&lt;br /&gt;
* [[User:PBaxter | Peter Baxter]] ()&lt;br /&gt;
* [[User:sayfrndship | Abdul waheed]] (Joomla 4.x component development)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;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/J4.x:Developing_an_MVC_Component|Prev: Overview|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/J4.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Next: Developing a Basic Component|class=expand}}&amp;lt;/div&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;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Joomla!_4.x]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
[[Category:Development{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.0{{#translation:}}]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/9/pl&amp;diff=1020547</id>
		<title>Translations:J4.x:Developing an MVC Component/Introduction/9/pl</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:J4.x:Developing_an_MVC_Component/Introduction/9/pl&amp;diff=1020547"/>
		<updated>2024-01-23T18:43:05Z</updated>

		<summary type="html">&lt;p&gt;Vaco: Created page with &amp;quot;W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;W większości przypadków migracja z Joomla 3.x do 4.x jest prostym procesem. Większość potrzebnych zmian to zmiany nazewnictwa i odstępów między nazwami oraz przeniesienie plików. Autor zamierza stworzyć przewodnik migracji po ukończeniu tego samouczka, który zostanie tutaj połączony.&lt;/div&gt;</summary>
		<author><name>Vaco</name></author>
	</entry>
</feed>