From e9db503590b9aa5df6159886c0451b7ecf4b8c87 Mon Sep 17 00:00:00 2001 From: Joseph Geller Date: Thu, 20 Sep 2018 12:22:56 -0500 Subject: [PATCH] Updated 4a. JCB Demo Component Directory, Folders and Files (markdown) --- ...-Component-Directory,-Folders-and-Files.md | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md b/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md index 0119980..7330cdf 100644 --- a/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md +++ b/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md @@ -269,26 +269,25 @@ Beneath the directory structure and files presented next you will find a short e \index.html \router.php - - -NetBeans Debug Trace - -index.php.{main}:49 -libraries/src/Application/CMSApplication.php.Joomla\CMS\Application\SiteApplication->execute:195 -libraries/src/Application/SiteApplication.php.Joomla\CMS\Application\SiteApplication->doExecute:233 -libraries/src/Application/SiteApplication.php.Joomla\CMS\Application\SiteApplication->dispatch:194 -libraries/src/Component/ComponentHelper.php.Joomla\CMS\Component\ComponentHelper::renderComponent:357 -libraries/src/Component/ComponentHelper.php.Joomla\CMS\Component\ComponentHelper::executeComponent:382 -components/com_demo/demo.php.require_once:35 - *** -**index.html** - File containing one line of Html in root of each folder to prevent viewing directory. -** All Joomla related files will have the following: -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); +Always keep in mind, JCB is doing most of the tasks related to items below referring to Joomla directories, files, classes, methods and properties. You do not have to, for example, put an index.html file in the root of every directory; you are not required to add the check for direct access to the file; you do not have to write code for the admin or site views unless you extend JCB with your own custom code. When combined with the leverage JCB has by reusing Joomla's MVC paradigm while adding the required structures and code to your own components, a myriad of tasks are taken care of for you. That's where elimination of time spent with these types of tasks and repetitive coding plus not reusing the Joomla! API greatly reduces your project's time-line. Later, after viewing the remaining videos and the chapters that accompany each in this manual you'll have acquired mastery of even more JCB features and functions, not to mention the understanding and use of the Joomla! API in your own component's code, both of which that will greatly reduce your project's delivery date. *** +**index.html** - File containing one line of HTML that blocks directory view. Must be in root of each folder. + +**All Joomla class files must begin with this code:** +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); +*** +## \com_demo\demo.php +## NetBeans Debug Trace +* index.php.{main}:49 +* libraries/src/Application/CMSApplication.php.Joomla\CMS\Application\SiteApplication->execute:195 +* libraries/src/Application/SiteApplication.php.Joomla\CMS\Application\SiteApplication->doExecute:233 +* libraries/src/Application/SiteApplication.php.Joomla\CMS\Application\SiteApplication->dispatch:194 +* libraries/src/Component/ComponentHelper.php.Joomla\CMS\Component\ComponentHelper::renderComponent:357 +* libraries/src/Component/ComponentHelper.php.Joomla\CMS\Component\ComponentHelper::executeComponent:382 +* components/com_demo/demo.php.require_once:35 -## \com_demo\demo.php - [Add unobtrusive JavaScript support to keep a tab state.](https://api.joomla.org/cms-3/classes/JHtmlBehavior.html#method_tabstate) \libraries\cms\html\behavior.php - [Get a document object and set the component css/js.](https://api.joomla.org/cms-2.5/classes/JFactory.html#method_getDocument)