Release of v5.0.15-alpha4

Improve the PHP environment setup validation. Add option to pass shared session via tag share.
This commit is contained in:
Robot 2024-07-29 18:14:59 +02:00
parent fca31eaf74
commit 68cd37f0bd
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
78 changed files with 3577 additions and 386 deletions

View File

@ -1,6 +1,7 @@
# v5.0.15-alpha3 # v5.0.15-alpha4
- Fix update error of undefined folder method (exists) - Improve the PHP environment setup validation
- Add option to pass shared session via tag share
# v5.0.15-alpha # v5.0.15-alpha
@ -8,6 +9,7 @@
- Add table schema checker - Add table schema checker
- Fix install issue with missing method removeFolder - Fix install issue with missing method removeFolder
- Fix display error with correct component namespace update form JCB - Fix display error with correct component namespace update form JCB
- Fix update error of undefined folder method (exists)
# v5.0.13 # v5.0.13

View File

@ -0,0 +1,64 @@
<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
// register additional namespace
spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix
$search = [
'libraries/vendor_getbible/TrueChristianBible.Joomla.Openai' => 'TrueChristianBible\\Joomla\\Openai',
'libraries/vendor_getbible/TrueChristianBible.Joomla.Gitea' => 'TrueChristianBible\\Joomla\\Gitea',
'libraries/vendor_getbible/TrueChristianBible.Joomla' => 'TrueChristianBible\\Joomla'
];
// Start the search and load if found
$found = false;
$found_base_dir = "";
$found_len = 0;
foreach ($search as $base_dir => $prefix)
{
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) === 0)
{
// we have a match so load the values
$found = true;
$found_base_dir = $base_dir;
$found_len = $len;
// done here
break;
}
}
// check if we found a match
if (!$found)
{
// not found so move to the next registered autoloader
return;
}
// get the relative class name
$relative_class = substr($class, $found_len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = __DIR__ . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file))
{
require $file;
}
});

View File

@ -20,12 +20,12 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerAdapter; use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Installer\InstallerScriptInterface; use Joomla\CMS\Installer\InstallerScriptInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Log\Log; use Joomla\CMS\Log\Log;
use Joomla\CMS\Version; use Joomla\CMS\Version;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\Filesystem\Folder; use Joomla\Filesystem\Folder;
use Joomla\Database\DatabaseInterface; use Joomla\Database\DatabaseInterface;
use TrueChristianBible\Joomla\GetBible\PHPConfigurationChecker;
use TrueChristianBible\Joomla\GetBible\Table\SchemaChecker; use TrueChristianBible\Joomla\GetBible\Table\SchemaChecker;
// No direct access to this file // No direct access to this file
@ -41,7 +41,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/** /**
* The CMS Application. * The CMS Application.
* *
* @var CMSApplication
* @since 4.4.2 * @since 4.4.2
*/ */
protected $app; protected $app;
@ -166,7 +165,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function install(InstallerAdapter $adapter): bool {return true;} public function install(InstallerAdapter $adapter): bool {return true;}
@ -188,7 +186,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function uninstall(InstallerAdapter $adapter): bool public function uninstall(InstallerAdapter $adapter): bool
@ -275,7 +272,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function preflight(string $type, InstallerAdapter $adapter): bool public function preflight(string $type, InstallerAdapter $adapter): bool
@ -304,8 +300,11 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
if ($type === 'update') if ($type === 'update')
{ {
// Check that the required configuration are set for PHP // Check that the PHP configurations are sufficient
$this->phpConfigurationCheck($this->app); if ($this->classExists(PHPConfigurationChecker::class))
{
(new PHPConfigurationChecker())->run();
}
// all things to clear out // all things to clear out
$removeFolders = []; $removeFolders = [];
@ -326,8 +325,11 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
if ($type === 'install') if ($type === 'install')
{ {
// Check that the required configuration are set for PHP // Check that the PHP configurations are sufficient
$this->phpConfigurationCheck($this->app); if ($this->classExists(PHPConfigurationChecker::class))
{
(new PHPConfigurationChecker())->run();
}
} }
return true; return true;
@ -340,7 +342,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function postflight(string $type, InstallerAdapter $adapter): bool public function postflight(string $type, InstallerAdapter $adapter): bool
@ -790,7 +791,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://getbible.net" title="Get Bible"> echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://getbible.net" title="Get Bible">
<img src="components/com_getbible/assets/images/vdm-component.jpg"/> <img src="components/com_getbible/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 5.0.15-alpha3 Was Successful! Let us know if anything is not working as expected.</h3></div>'; <h3>Upgrade to Version 5.0.15-alpha4 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table. // Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions(); $this->setActionLogsExtensions();
@ -1075,7 +1076,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Remove the files and folders in the given array from * Remove the files and folders in the given array from
* *
* @return void * @return void
*
* @since 3.6 * @since 3.6
*/ */
protected function removeFiles() protected function removeFiles()
@ -1107,7 +1107,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Moves the CLI scripts into the CLI folder in the CMS * Moves the CLI scripts into the CLI folder in the CMS
* *
* @return void * @return void
*
* @since 3.6 * @since 3.6
*/ */
protected function moveCliFiles() protected function moveCliFiles()
@ -1900,130 +1899,31 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
*/ */
protected function classExists(string $className): bool protected function classExists(string $className): bool
{ {
if (!class_exists($className, true)) if (class_exists($className, true))
{ {
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_getbible/src/Helper/PowerloaderHelper.php';
if (file_exists($power_autoloader))
{
require_once $power_autoloader;
}
// Check again if the class now exists after requiring the autoloader
if (!class_exists($className, true))
{
return false;
}
}
return true; return true;
} }
/** // Autoloaders to check
* Define the required limits with specific messages for success and warning scenarios $autoloaders = [
* __DIR__ . '/GetbibleInstallerPowerloader.php',
* @var array JPATH_ADMINISTRATOR . '/components/com_getbible/src/Helper/PowerloaderHelper.php'
* @since 3.0.8
*/
protected array $requiredPHPConfigs = [
'upload_max_filesize' => [
'value' => '64M',
'success' => 'The upload_max_filesize is appropriately set to handle large files, which is essential for uploading substantial components and media.',
'warning' => 'The current upload_max_filesize may not support large file uploads effectively, potentially causing failures during component installation.'
],
'post_max_size' => [
'value' => '128M',
'success' => 'The post_max_size setting is sufficient to manage large data submissions, ensuring smooth data processing within forms and uploads.',
'warning' => 'An insufficient post_max_size can lead to truncated data submissions, affecting form functionality and data integrity.'
],
'max_execution_time' => [
'value' => 60,
'success' => 'Max execution time is set high enough to execute complex operations without premature termination, which is crucial for lengthy operations.',
'warning' => 'A low max execution time could lead to script timeouts, especially during intensive operations, which might interrupt execution and cause failures during the compiling of a large extension.'
],
'max_input_vars' => [
'value' => 5000,
'success' => 'The max_input_vars setting supports a high number of input variables, facilitating complex forms and detailed component configurations.',
'warning' => 'Too few max_input_vars may result in lost data during processing complex forms, which can lead to incomplete configurations and operational issues.'
],
'max_input_time' => [
'value' => 60,
'success' => 'Max input time is adequate for processing inputs efficiently during high-load operations, ensuring no premature timeouts.',
'warning' => 'An insufficient max input time could result in incomplete data processing during input-heavy operations, potentially leading to errors and data loss.'
],
'memory_limit' => [
'value' => '256M',
'success' => 'The memory limit is set high to accommodate extensive operations and data processing, which enhances overall performance and stability.',
'warning' => 'A low memory limit can lead to frequent crashes and performance issues, particularly when processing large amounts of data or complex calculations.'
]
]; ];
/** foreach ($autoloaders as $autoloader)
* Helper function to convert PHP INI memory values to bytes
*
* @param string $value The value to convert
*
* @return int The bytes value
* @since 3.0.8
*/
protected function convertToBytes(string $value): int
{ {
$value = trim($value); if (file_exists($autoloader))
$lastChar = strtolower($value[strlen($value) - 1]); {
$numValue = substr($value, 0, -1); require_once $autoloader;
switch ($lastChar) if (class_exists($className, true))
{ {
case 'g': return true;
return $numValue * 1024 * 1024 * 1024; }
case 'm':
return $numValue * 1024 * 1024;
case 'k':
return $numValue * 1024;
default:
return (int) $value;
} }
} }
/** return false;
* Check that the required configurations are set for PHP
*
* @param $app The application
*
* @return void
* @since 3.0.8
*/
protected function phpConfigurationCheck($app): void
{
$showHelp = false;
// Check each configuration and provide detailed feedback
foreach ($this->requiredPHPConfigs as $configName => $configDetails)
{
$currentValue = ini_get($configName);
if ($currentValue === false)
{
$app->enqueueMessage("Error: Unable to retrieve current setting for '{$configName}'.", 'error');
continue;
}
$isMemoryValue = strpbrk($configDetails['value'], 'KMG') !== false;
$requiredValueBytes = $isMemoryValue ? $this->convertToBytes($configDetails['value']) : (int) $configDetails['value'];
$currentValueBytes = $isMemoryValue ? $this->convertToBytes($currentValue) : (int) $currentValue;
$conditionMet = $currentValueBytes >= $requiredValueBytes;
$messageType = $conditionMet ? 'message' : 'warning';
$messageText = $conditionMet ?
"Success: {$configName} is set to {$currentValue}. " . $configDetails['success'] :
"Warning: {$configName} configuration should be at least {$configDetails['value']} but is currently {$currentValue}. " . $configDetails['warning'];
$showHelp = ($showHelp || $messageType === 'warning') ? true : false;
$app->enqueueMessage($messageText, $messageType);
}
if ($showHelp)
{
$app->enqueueMessage('To optimize your Get Bible environment, specific PHP settings must be enhanced.<br>These settings are crucial for ensuring the successful installation and stable functionality of the extension.<br>We\'ve identified that certain configurations currently do not meet the recommended standards.<br>To adjust these settings and prevent potential issues, please consult our detailed guide available at <a href="https://git.vdm.dev/getBible/support/wiki/PHP-Settings" target="_blank">Get Bible PHP Settings Wiki</a>.
', 'notice');
}
} }
/** /**

View File

@ -1,4 +1,4 @@
# Get Bible (5.0.15-alpha3) # Get Bible (5.0.15-alpha4)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible") ![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net) + *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015 + *First Build*: 3rd December, 2015
+ *Last Build*: 15th July, 2024 + *Last Build*: 29th July, 2024
+ *Version*: 5.0.15-alpha3 + *Version*: 5.0.15-alpha4
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**642 Hours** or **80 Eight Hour Days** (actual time the author saved - **670 Hours** or **84 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **230191** + *Line count*: **240201**
+ *File count*: **1905** + *File count*: **1953**
+ *Folder count*: **193** + *Folder count*: **195**
**424 Hours** or **53 Eight Hour Days** (the actual time the author spent) **442 Hours** or **55 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @161hours** = codingtime / 4; > **debugging @168hours** = codingtime / 4;
> **planning @92hours** = codingtime / 7; > **planning @96hours** = codingtime / 7;
> **mapping @64hours** = codingtime / 10; > **mapping @67hours** = codingtime / 10;
> **office @107hours** = codingtime / 6;) > **office @112hours** = codingtime / 6;)
**1066 Hours** or **133 Eight Hour Days** **1112 Hours** or **139 Eight Hour Days**
(a total of the realistic time frame for this project) (a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **26.6 weeks** or **5.5 months** Project duration: **27.8 weeks** or **5.8 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -1,4 +1,4 @@
# Get Bible (5.0.15-alpha3) # Get Bible (5.0.15-alpha4)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible") ![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net) + *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015 + *First Build*: 3rd December, 2015
+ *Last Build*: 15th July, 2024 + *Last Build*: 29th July, 2024
+ *Version*: 5.0.15-alpha3 + *Version*: 5.0.15-alpha4
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**642 Hours** or **80 Eight Hour Days** (actual time the author saved - **670 Hours** or **84 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **230191** + *Line count*: **240201**
+ *File count*: **1905** + *File count*: **1953**
+ *Folder count*: **193** + *Folder count*: **195**
**424 Hours** or **53 Eight Hour Days** (the actual time the author spent) **442 Hours** or **55 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @161hours** = codingtime / 4; > **debugging @168hours** = codingtime / 4;
> **planning @92hours** = codingtime / 7; > **planning @96hours** = codingtime / 7;
> **mapping @64hours** = codingtime / 10; > **mapping @67hours** = codingtime / 10;
> **office @107hours** = codingtime / 6;) > **office @112hours** = codingtime / 6;)
**1066 Hours** or **133 Eight Hour Days** **1112 Hours** or **139 Eight Hour Days**
(a total of the realistic time frame for this project) (a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **26.6 weeks** or **5.5 months** Project duration: **27.8 weeks** or **5.8 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -335,7 +335,7 @@ class BookController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class ChapterController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class LinkerController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class NoteController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class Open_ai_messageController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class Open_ai_responseController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class PasswordController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class PromptController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class TagController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class Tagged_verseController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class TranslationController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -335,7 +335,7 @@ class VerseController extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Book view display method * Book view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Books view display method * Books view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Chapter view display method * Chapter view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Chapters view display method * Chapters view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Linker view display method * Linker view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Linkers view display method * Linkers view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Note view display method * Note view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Notes view display method * Notes view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Open_ai_message view display method * Open_ai_message view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Open_ai_messages view display method * Open_ai_messages view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Open_ai_response view display method * Open_ai_response view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Open_ai_responses view display method * Open_ai_responses view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Password view display method * Password view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Passwords view display method * Passwords view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Prompt view display method * Prompt view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Prompts view display method * Prompts view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Tag view display method * Tag view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Tagged_verse view display method * Tagged_verse view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Tagged_verses view display method * Tagged_verses view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Tags view display method * Tags view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Translation view display method * Translation view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Translations view display method * Translations view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* Verse view display method * Verse view display method
* *
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible'); $this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri; use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Verses view display method * Verses view display method
* *
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity(); $this->user ??= $this->getCurrentUser();
// Load the filter form from xml. // Load the filter form from xml.
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
// Load the active filters. // Load the active filters.

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'bookTab', 'permissions', Text::_('COM_GETBIBLE_BOOK_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'bookTab', 'permissions', Text::_('COM_GETBIBLE_BOOK_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_BOOK_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'chapterTab', 'permissions', Text::_('COM_GETBIBLE_CHAPTER_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'chapterTab', 'permissions', Text::_('COM_GETBIBLE_CHAPTER_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_CHAPTER_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -122,14 +122,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'linkerTab', 'permissions', Text::_('COM_GETBIBLE_LINKER_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'linkerTab', 'permissions', Text::_('COM_GETBIBLE_LINKER_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_LINKER_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'noteTab', 'permissions', Text::_('COM_GETBIBLE_NOTE_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'noteTab', 'permissions', Text::_('COM_GETBIBLE_NOTE_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_NOTE_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -91,14 +91,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'open_ai_messageTab', 'permissions', Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'open_ai_messageTab', 'permissions', Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -120,14 +120,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'open_ai_responseTab', 'permissions', Text::_('COM_GETBIBLE_OPEN_AI_RESPONSE_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'open_ai_responseTab', 'permissions', Text::_('COM_GETBIBLE_OPEN_AI_RESPONSE_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_OPEN_AI_RESPONSE_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'passwordTab', 'permissions', Text::_('COM_GETBIBLE_PASSWORD_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'passwordTab', 'permissions', Text::_('COM_GETBIBLE_PASSWORD_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_PASSWORD_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -102,14 +102,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'promptTab', 'permissions', Text::_('COM_GETBIBLE_PROMPT_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'promptTab', 'permissions', Text::_('COM_GETBIBLE_PROMPT_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_PROMPT_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -88,14 +88,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'tagTab', 'permissions', Text::_('COM_GETBIBLE_TAG_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'tagTab', 'permissions', Text::_('COM_GETBIBLE_TAG_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_TAG_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'tagged_verseTab', 'permissions', Text::_('COM_GETBIBLE_TAGGED_VERSE_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'tagged_verseTab', 'permissions', Text::_('COM_GETBIBLE_TAGGED_VERSE_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -91,14 +91,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'translationTab', 'permissions', Text::_('COM_GETBIBLE_TRANSLATION_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'translationTab', 'permissions', Text::_('COM_GETBIBLE_TRANSLATION_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_TRANSLATION_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -91,14 +91,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'verseTab', 'permissions', Text::_('COM_GETBIBLE_VERSE_PERMISSION', true)); ?> <?php echo Html::_('uitab.addTab', 'verseTab', 'permissions', Text::_('COM_GETBIBLE_VERSE_PERMISSION', true)); ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<fieldset class="adminform"> <fieldset id="fieldset-rules" class="options-form">
<div class="adminformlist"> <legend><?php echo Text::_('COM_GETBIBLE_VERSE_PERMISSION'); ?></legend>
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div> <div>
<?php echo $field->label; echo $field->input;?> <?php echo $this->form->getInput('rules'); ?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div> </div>
</fieldset> </fieldset>
</div> </div>

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="5.0" method="upgrade"> <extension type="component" version="5.0" method="upgrade">
<name>COM_GETBIBLE</name> <name>COM_GETBIBLE</name>
<creationDate>15th July, 2024</creationDate> <creationDate>29th July, 2024</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://getbible.net</authorUrl> <authorUrl>https://getbible.net</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright> <copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>5.0.15-alpha3</version> <version>5.0.15-alpha4</version>
<description><![CDATA[ <description><![CDATA[
<h1>Get Bible (v.5.0.15-alpha3)</h1> <h1>Get Bible (v.5.0.15-alpha4)</h1>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<p>Welcome to the next level of scripture engagement - The Bible for Joomla! Our purpose is to bring the Word of God to every person, in their native language, entirely free. This isn't just a typical extension; it's a groundbreaking tool developed to span language divides and deliver a rich, customizable Bible study experience to users worldwide. <p>Welcome to the next level of scripture engagement - The Bible for Joomla! Our purpose is to bring the Word of God to every person, in their native language, entirely free. This isn't just a typical extension; it's a groundbreaking tool developed to span language divides and deliver a rich, customizable Bible study experience to users worldwide.

View File

@ -15,6 +15,7 @@ namespace TrueChristianBible\Joomla\Gitea\Abstraction;
use TrueChristianBible\Joomla\Gitea\Utilities\Http; use TrueChristianBible\Joomla\Gitea\Utilities\Http;
use TrueChristianBible\Joomla\Gitea\Utilities\Uri; use TrueChristianBible\Joomla\Gitea\Utilities\Uri;
use TrueChristianBible\Joomla\Gitea\Utilities\Response; use TrueChristianBible\Joomla\Gitea\Utilities\Response;
use TrueChristianBible\Joomla\Interfaces\Git\ApiInterface;
/** /**
@ -22,7 +23,7 @@ use TrueChristianBible\Joomla\Gitea\Utilities\Response;
* *
* @since 3.2.0 * @since 3.2.0
*/ */
abstract class Api abstract class Api implements ApiInterface
{ {
/** /**
* The Http class * The Http class

View File

@ -12,6 +12,7 @@
namespace TrueChristianBible\Joomla\Gitea\Repository; namespace TrueChristianBible\Joomla\Gitea\Repository;
use TrueChristianBible\Joomla\Interfaces\Git\Repository\ContentsInterface;
use TrueChristianBible\Joomla\Gitea\Abstraction\Api; use TrueChristianBible\Joomla\Gitea\Abstraction\Api;
@ -20,7 +21,7 @@ use TrueChristianBible\Joomla\Gitea\Abstraction\Api;
* *
* @since 3.2.0 * @since 3.2.0
*/ */
class Contents extends Api class Contents extends Api implements ContentsInterface
{ {
/** /**
* Get a file from a repository. * Get a file from a repository.
@ -349,16 +350,16 @@ class Contents extends Api
* @param string $repo The repository name. * @param string $repo The repository name.
* @param string $filepath The file path. * @param string $filepath The file path.
* @param string $message The commit message. * @param string $message The commit message.
* @param string $branch The branch name (optional).
* @param string $sha The blob SHA of the file. * @param string $sha The blob SHA of the file.
* @param string $authorName The author name (optional). * @param string|null $branch The branch name (optional).
* @param string $authorEmail The author email (optional). * @param string|null $authorName The author name (optional).
* @param string $committerName The committer name (optional). * @param string|null $authorEmail The author email (optional).
* @param string $committerEmail The committer email (optional). * @param string|null $committerName The committer name (optional).
* @param string $authorDate The author date (optional). * @param string|null $committerEmail The committer email (optional).
* @param string $committerDate The committer date (optional). * @param string|null $authorDate The author date (optional).
* @param string $newBranch The new branch name (optional). * @param string|null $committerDate The committer date (optional).
* @param bool $signoff Add a Signed-off-by trailer (optional). * @param string|null $newBranch The new branch name (optional).
* @param bool|null $signoff Add a Signed-off-by trailer (optional).
* *
* @return object|null * @return object|null
* @since 3.2.0 * @since 3.2.0
@ -449,7 +450,7 @@ class Contents extends Api
// Send the delete request. // Send the delete request.
return $this->response->get( return $this->response->get(
$this->http->delete( $this->http->delete(
$this->uri->get($path), $this->uri->get($path), [], null,
json_encode($data) json_encode($data)
) )
); );
@ -461,7 +462,7 @@ class Contents extends Api
* @param string $owner The owner name. * @param string $owner The owner name.
* @param string $repo The repository name. * @param string $repo The repository name.
* @param string $filepath The file path. * @param string $filepath The file path.
* @param string $ref The name of the commit/branch/tag. * @param string|null $ref The name of the commit/branch/tag.
* *
* @return string|null * @return string|null
* @since 3.2.0 * @since 3.2.0

View File

@ -13,9 +13,11 @@ namespace TrueChristianBible\Joomla\Gitea\Utilities;
use Joomla\CMS\Http\Http as JoomlaHttp; use Joomla\CMS\Http\Http as JoomlaHttp;
use Joomla\CMS\Uri\Uri;
use Joomla\Registry\Registry; use Joomla\Registry\Registry;
/** /**
* The Gitea Http * The Gitea Http
* *

View File

@ -0,0 +1,305 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Abstraction;
use TrueChristianBible\Joomla\Interfaces\Activeregistryinterface;
/**
* Active Storage Registry.
*
* Don't use this beyond 10 dimensional depth for best performance.
*
* @since 3.2.0
*/
abstract class ActiveRegistry implements Activeregistryinterface
{
/**
* The registry array.
*
* @var array
* @since 3.2.0
**/
protected array $active = [];
/**
* Base switch to add values as string or array
*
* @var boolean
* @since 3.2.0
**/
protected bool $addAsArray = false;
/**
* Base switch to keep array values unique
*
* @var boolean
* @since 3.2.2
**/
protected bool $uniqueArray = false;
/**
* Check if the registry has any content.
*
* @return bool Returns true if the active array is not empty, false otherwise.
* @since 3.2.0
*/
public function isActive(): bool
{
return !empty($this->active);
}
/**
* Get all value from the active registry.
*
* @return array The values or empty array.
* @since 3.2.0
*/
public function allActive(): array
{
return $this->active;
}
/**
* Sets a value into the registry using multiple keys.
*
* @param mixed $value The value to set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function setActive($value, string ...$keys): void
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to set any value.");
}
$array = &$this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
if (!is_array($array))
{
$path = '[' . implode('][', $keys) . ']';
throw new \InvalidArgumentException("Attempted to use key '{$key}' on a non-array value: {$array}. Path: {$path} Value: {$value}");
}
$array[$key] = [];
}
$array = &$array[$key];
}
$array = $value;
}
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on the value's type.
*
* @param mixed $value The value to set.
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function addActive($value, ?bool $asArray, string ...$keys): void
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to add any value.");
}
// null fallback to class value
if ($asArray === null)
{
$asArray = $this->addAsArray;
}
$array = &$this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
if (!is_array($array))
{
$path = '[' . implode('][', $keys) . ']';
throw new \InvalidArgumentException("Attempted to use key '{$key}' on a non-array value: {$array}. Path: {$path} Value: {$value}");
}
$array[$key] = [];
}
$array = &$array[$key];
}
// add string
if (!$asArray && $array === [])
{
$array = '';
}
// Handle the adding logic at the tip of the array
if (is_array($array) || $asArray)
{
if (!is_array($array))
{
// Convert to array if it's not already an array
$array = [$array];
}
if ($this->uniqueArray && in_array($value, $array))
{
// we do nothing
return;
}
else
{
$array[] = $value;
}
}
else
{
if (is_string($value) || is_numeric($value))
{
$array .= (string) $value;
}
else
{
$array = $value;
}
}
}
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param mixed $default The default value if not set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function getActive($default, string ...$keys)
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to get any value.");
}
$array = $this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
return $default;
}
$array = $array[$key];
}
return $array;
}
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function removeActive(string ...$keys): void
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to remove any value.");
}
$array = &$this->active;
$lastKey = array_pop($keys);
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
return; // Exit early if the key doesn't exist
}
$array = &$array[$key];
}
unset($array[$lastKey]);
}
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function existsActive(string ...$keys): bool
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to check if any value exist.");
}
$array = $this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
return false;
}
$array = $array[$key];
}
return true;
}
/**
* Checks that the keys are valid
*
* @param array $keys The keys to determine the location.
*
* @return bool False if any of the keys are not a number or string.
* @since 3.2.0
*/
protected function validActiveKeys(array $keys): bool
{
foreach ($keys as $key)
{
if ($key === '' || (!is_string($key) && !is_numeric($key)))
{
return false;
}
}
return true;
}
}

View File

@ -0,0 +1,214 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Abstraction;
use Joomla\CMS\Factory;
use TrueChristianBible\Joomla\Interfaces\PHPConfigurationCheckerInterface;
use TrueChristianBible\Joomla\Abstraction\Registry;
/**
* PHP Configuration Checker
*
* @since 5.0.2
*/
abstract class PHPConfigurationChecker extends Registry implements PHPConfigurationCheckerInterface
{
/**
* The upload max filesize value
*
* @var string
* @since 5.0.2
**/
protected string $upload_max_filesize;
/**
* The post max size value
*
* @var string
* @since 5.0.2
**/
protected string $post_max_size;
/**
* The max execution time value
*
* @var int
* @since 5.0.2
**/
protected int $max_execution_time;
/**
* The max input vars value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_vars;
/**
* The max input time value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_time;
/**
* The memory limit value
*
* @var string
* @since 5.0.2
**/
protected string $memory_limit;
/**
* The registry array.
*
* @var array
* @since 5.0.2
**/
protected array $active = [
'php' => [
'upload_max_filesize' => [
'success' => 'The upload_max_filesize is appropriately set to handle large files, which is essential for uploading substantial components and media.',
'warning' => 'The current upload_max_filesize may not support large file uploads effectively, potentially causing failures during component installation.'
],
'post_max_size' => [
'success' => 'The post_max_size setting is sufficient to manage large data submissions, ensuring smooth data processing within forms and uploads.',
'warning' => 'An insufficient post_max_size can lead to truncated data submissions, affecting form functionality and data integrity.'
],
'max_execution_time' => [
'success' => 'Max execution time is set high enough to execute complex operations without premature termination, which is crucial for lengthy operations.',
'warning' => 'A low max execution time could lead to script timeouts, especially during intensive operations, which might interrupt execution and cause failures during the compiling of a large extension.'
],
'max_input_vars' => [
'success' => 'The max_input_vars setting supports a high number of input variables, facilitating complex forms and detailed component configurations.',
'warning' => 'Too few max_input_vars may result in lost data during processing complex forms, which can lead to incomplete configurations and operational issues.'
],
'max_input_time' => [
'success' => 'Max input time is adequate for processing inputs efficiently during high-load operations, ensuring no premature timeouts.',
'warning' => 'An insufficient max input time could result in incomplete data processing during input-heavy operations, potentially leading to errors and data loss.'
],
'memory_limit' => [
'success' => 'The memory limit is set high to accommodate extensive operations and data processing, which enhances overall performance and stability.',
'warning' => 'A low memory limit can lead to frequent crashes and performance issues, particularly when processing large amounts of data or complex calculations.'
]
],
'environment' => [
'name' => 'extension environment',
'objective' => 'These settings are crucial for ensuring the successful installation and stable functionality of the extension.',
'wiki_name' => 'PHP Settings Wiki',
'wiki_url' => '#'
]
];
/**
* Application object.
*
* @since 5.0.2
**/
protected $app;
/**
* Constructor.
*
* @param $app The app object.
*
* @since 5.0.2
*/
public function __construct($app = null)
{
$this->app = $app ?: Factory::getApplication();
// set the required PHP Configures
$this->set('php.upload_max_filesize.value', $this->upload_max_filesize);
$this->set('php.post_max_size.value', $this->post_max_size);
$this->set('php.max_execution_time.value', $this->max_execution_time);
$this->set('php.max_input_vars.value', $this->max_input_vars);
$this->set('php.max_input_time.value', $this->max_input_time);
$this->set('php.memory_limit.value', $this->memory_limit);
}
/**
* Check that the required configurations are set for PHP
*
* @return void
* @since 5.0.2
**/
public function run(): void
{
$showHelp = false;
// Check each configuration and provide detailed feedback
$configurations = $this->active['php'] ?? [];
foreach ($configurations as $configName => $configDetails)
{
$currentValue = ini_get($configName);
if ($currentValue === false)
{
$this->app->enqueueMessage("Error: Unable to retrieve current setting for '{$configName}'.", 'error');
continue;
}
$requiredValue = $configDetails['value'] ?? 0;
$isMemoryValue = strpbrk($requiredValue, 'KMG') !== false;
$requiredValueBytes = $isMemoryValue ? $this->convertToBytes($requiredValue) : (int) $requiredValue;
$currentValueBytes = $isMemoryValue ? $this->convertToBytes($currentValue) : (int) $currentValue;
$conditionMet = $currentValueBytes >= $requiredValueBytes;
$messageType = $conditionMet ? 'message' : 'warning';
$messageText = $conditionMet ?
"Success: {$configName} is set to {$currentValue}. " . $configDetails['success'] ?? '':
"Warning: {$configName} configuration should be at least {$requiredValue} but is currently {$currentValue}. " . $configDetails['warning'] ?? '';
$showHelp = ($showHelp || $messageType === 'warning') ? true : false;
$this->app->enqueueMessage($messageText, $messageType);
}
if ($showHelp)
{
$this->app->enqueueMessage("To optimize your {$this->get('environment.name', 'extension')}, specific PHP settings must be enhanced.<br>{$this->get('environment.objective', '')}<br>We've identified that certain configurations currently do not meet the recommended standards.<br>To adjust these settings and prevent potential issues, please consult our detailed guide available at <a href=\"https://{$this->get('environment.wiki_url', '#')}\" target=\"_blank\">{$this->get('environment.wiki_name', 'PHP Settings Wiki')}</a>.", 'notice');
}
}
/**
* Helper function to convert PHP INI memory values to bytes
*
* @param string $value The value to convert
*
* @return int The bytes value
* @since 5.0.2
*/
protected function convertToBytes(string $value): int
{
$value = trim($value);
$lastChar = strtolower($value[strlen($value) - 1]);
$numValue = substr($value, 0, -1);
switch ($lastChar)
{
case 'g':
return $numValue * 1024 * 1024 * 1024;
case 'm':
return $numValue * 1024 * 1024;
case 'k':
return $numValue * 1024;
default:
return (int) $value;
}
}
}

View File

@ -0,0 +1,191 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Abstraction;
use TrueChristianBible\Joomla\Interfaces\Registryinterface;
use TrueChristianBible\Joomla\Abstraction\ActiveRegistry;
/**
* VDM Basic Registry.
*
* Don't use this beyond 10 dimensional depth for best performance.
*
* @since 3.2.0
*/
abstract class Registry extends ActiveRegistry implements Registryinterface
{
/**
* Path separator
*
* @var string|null
* @since 3.2.0
*/
protected ?string $separator = '.';
/**
* Sets a value into the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function set(string $path, $value): self
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to set any value.");
}
$this->setActive($value, ...$keys);
return $this;
}
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on $asArray switch.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function add(string $path, $value, ?bool $asArray = null): self
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to add any value.");
}
$this->addActive($value, $asArray, ...$keys);
return $this;
}
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $default Optional default value, returned if the internal doesn't exist.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function get(string $path, $default = null)
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to get any value.");
}
return $this->getActive($default, ...$keys);
}
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function remove(string $path): self
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to remove any value.");
}
$this->removeActive(...$keys);
return $this;
}
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function exists(string $path): bool
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to check if any value exist.");
}
return $this->existsActive(...$keys);
}
/**
* Sets a separator value
*
* @param string|null $value The value to set.
*
* @return self
* @since 3.2.0
*/
public function setSeparator(?string $value): self
{
$this->separator = $value;
return $this;
}
/**
* Get that the active keys from a path
*
* @param string $path The path to determine the location registry.
*
* @return array|null The valid array of keys
* @since 3.2.0
*/
protected function getActiveKeys(string $path): ?array
{
// empty path no allowed
if ($path === '')
{
return null;
}
// Flatten the path
if ($this->separator === null || $this->separator === '')
{
return [$path];
}
$keys = array_values(array_filter(explode($this->separator, $path), 'strlen'));
if (empty($keys))
{
return null;
}
return $keys;
}
}

View File

@ -455,8 +455,8 @@ abstract class Schema implements SchemaInterface
return true; return true;
} }
if (is_string($expected['default']) && strtoupper($expected['default']) === 'EMPTY' && if (isset($expected['default']) && is_string($expected['default']) && strtoupper($expected['default']) === 'EMPTY' &&
is_string($current->Default) && strpos($current->Default, 'EMPTY') !== false) isset($current->Default) && is_string($current->Default) && strpos($current->Default, 'EMPTY') !== false)
{ {
return true; // little fix return true; // little fix
} }

View File

@ -13,7 +13,6 @@ namespace TrueChristianBible\Joomla\Abstraction;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication;
use TrueChristianBible\Joomla\Interfaces\SchemaInterface as Schema; use TrueChristianBible\Joomla\Interfaces\SchemaInterface as Schema;
use TrueChristianBible\Joomla\Interfaces\Tableinterface as Table; use TrueChristianBible\Joomla\Interfaces\Tableinterface as Table;
use TrueChristianBible\Joomla\Utilities\ClassHelper; use TrueChristianBible\Joomla\Utilities\ClassHelper;
@ -46,22 +45,21 @@ abstract class SchemaChecker implements SchemaCheckerInterface
/** /**
* Application object. * Application object.
* *
* @var CMSApplication
* @since 3.2.2 * @since 3.2.2
**/ **/
protected CMSApplication $app; protected $app;
/** /**
* Constructor. * Constructor.
* *
* @param Schema|null $schema The Schema Class. * @param Schema|null $schema The Schema Class.
* @param Table|null $table The Table Class. * @param Table|null $table The Table Class.
* @param CMSApplication|null $app The app object. * @param $app The app object.
* *
* @throws \Exception * @throws \Exception
* @since 3.2.2 * @since 3.2.2
*/ */
public function __construct(?Schema $schema = null, ?Table $table = null, ?CMSApplication $app = null) public function __construct(?Schema $schema = null, ?Table $table = null, $app = null)
{ {
$this->schema = $schema; $this->schema = $schema;
$this->table = $table; $this->table = $table;

View File

@ -0,0 +1,88 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\GetBible;
use TrueChristianBible\Joomla\Interfaces\PHPConfigurationCheckerInterface;
use TrueChristianBible\Joomla\Abstraction\PHPConfigurationChecker as ExtendingPHPConfigurationChecker;
/**
* Getbible PHP Configuration Checker
*
* @since 5.02
*/
final class PHPConfigurationChecker extends ExtendingPHPConfigurationChecker implements PHPConfigurationCheckerInterface
{
/**
* The upload max filesize value
*
* @var string
* @since 5.0.2
**/
protected string $upload_max_filesize = '64M';
/**
* The post max size value
*
* @var string
* @since 5.0.2
**/
protected string $post_max_size = '128M';
/**
* The max execution time value
*
* @var int
* @since 5.0.2
**/
protected int $max_execution_time = 60;
/**
* The max input vars value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_vars = 5000;
/**
* The max input time value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_time = 60;
/**
* The memory limit value
*
* @var string
* @since 5.0.2
**/
protected string $memory_limit = '256M';
/**
* Constructor.
*
* @since 5.0.2
*/
public function __construct($app = null)
{
parent::__construct($app);
// set the required PHP Configures
$this->set('environment.name', 'Getbible environment');
$this->set('environment.wiki_url', 'git.vdm.dev/getBible/support/wiki/PHP-Settings');
}
}

View File

@ -0,0 +1,100 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces;
/**
* The Active Registry Interface
*
* @since 3.2.0
*/
interface Activeregistryinterface
{
/**
* Check if the registry has any content.
*
* @return bool Returns true if the active array is not empty, false otherwise.
* @since 3.2.0
*/
public function isActive(): bool;
/**
* Retrieves all value from the registry.
*
* @return array The values.
* @since 3.2.0
*/
public function allActive(): array;
/**
* Sets a value into the registry using multiple keys.
*
* @param mixed $value The value to set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function setActive($value, string ...$keys): void;
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on the value's type.
*
* @param mixed $value The value to set.
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function addActive($value, ?bool $asArray, string ...$keys): void;
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param mixed $default The default value if not set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function getActive($default, string ...$keys);
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function removeActive(string ...$keys): void;
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function existsActive(string ...$keys): bool;
}

View File

@ -0,0 +1,50 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces\Git;
/**
* The Git Api Interface
*
* @since 3.2.0
*/
interface ApiInterface
{
/**
* Load/Reload API.
*
* @param string|null $url The url.
* @param token|null $token The token.
* @param bool $backup The backup swapping switch.
*
* @return void
* @since 3.2.0
**/
public function load_(?string $url = null, ?string $token = null, bool $backup = true): void;
/**
* Reset to previous toke, url it set
*
* @return void
* @since 3.2.0
**/
public function reset_(): void;
/**
* Get the API url
*
* @return string
* @since 3.2.0
**/
public function api();
}

View File

@ -0,0 +1,209 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces\Git\Repository;
use TrueChristianBible\Joomla\Interfaces\Git\ApiInterface;
/**
* The Git Repository Contents Interface
*
* @since 3.2.2
*/
interface ContentsInterface extends ApiInterface
{
/**
* Get a file from a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string|null $ref Optional. The name of the commit/branch/tag.
* Default the repository's default branch (usually master).
*
* @return mixed
* @since 3.2.0
**/
public function get(string $owner, string $repo, string $filepath, ?string $ref = null);
/**
* Get the metadata and contents (if a file) of an entry in a repository,
* or a list of entries if a directory.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file or directory path.
* @param string|null $ref Optional. The name of the commit/branch/tag.
* Default the repository's default branch (usually master).
*
* @return null|array|object
* @since 3.2.0
**/
public function metadata(string $owner, string $repo, string $filepath, ?string $ref = null): null|array|object;
/**
* Create a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $content The file content.
* @param string $message The commit message.
* @param string $branch The branch name. Defaults to the repository's default branch.
* @param string|null $authorName The author's name.
* @param string|null $authorEmail The author's email.
* @param string|null $committerName The committer's name.
* @param string|null $committerEmail The committer's email.
* @param string|null $newBranch Whether to create a new branch. Defaults to null.
* @param string|null $authorDate The author's date.
* @param string|null $committerDate The committer's date.
* @param bool|null $signoff Add a Signed-off-by trailer. Defaults to null.
*
* @return object|null
* @since 3.2.0
**/
public function create(
string $owner,
string $repo,
string $filepath,
string $content,
string $message,
string $branch = 'master',
?string $authorName = null,
?string $authorEmail = null,
?string $committerName = null,
?string $committerEmail = null,
?string $newBranch = null,
?string $authorDate = null,
?string $committerDate = null,
?bool $signoff = null
): ?object;
/**
* Get the metadata of all the entries of the root directory.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string|null $ref The name of the commit/branch/tag. Default the repository's default branch (usually master).
*
* @return array|null
* @since 3.2.0
**/
public function root(string $owner, string $repo, ?string $ref = null): ?array;
/**
* Update a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $content The file content.
* @param string $message The commit message.
* @param string $sha The blob SHA of the file.
* @param string $branch The branch name. Defaults to the repository's default branch.
* @param string|null $authorName The author name. Defaults to the authenticated user.
* @param string|null $authorEmail The author email. Defaults to the authenticated user.
* @param string|null $committerName The committer name. Defaults to the authenticated user.
* @param string|null $committerEmail The committer email. Defaults to the authenticated user.
* @param string|null $authorDate The author date.
* @param string|null $committerDate The committer date.
* @param string|null $fromPath The original file path to move/rename.
* @param string|null $newBranch The new branch to create from the specified branch.
* @param bool|null $signoff Add a Signed-off-by trailer.
*
* @return object|null
* @since 3.2.0
**/
public function update(
string $owner,
string $repo,
string $filepath,
string $content,
string $message,
string $sha,
string $branch = 'master',
?string $authorName = null,
?string $authorEmail = null,
?string $committerName = null,
?string $committerEmail = null,
?string $authorDate = null,
?string $committerDate = null,
?string $fromPath = null,
?string $newBranch = null,
?bool $signoff = null
): ?object;
/**
* Delete a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $message The commit message.
* @param string $sha The blob SHA of the file.
* @param string|null $branch The branch name (optional).
* @param string|null $authorName The author name (optional).
* @param string|null $authorEmail The author email (optional).
* @param string|null $committerName The committer name (optional).
* @param string|null $committerEmail The committer email (optional).
* @param string|null $authorDate The author date (optional).
* @param string|null $committerDate The committer date (optional).
* @param string|null $newBranch The new branch name (optional).
* @param bool|null $signoff Add a Signed-off-by trailer (optional).
*
* @return object|null
* @since 3.2.0
**/
public function delete(
string $owner,
string $repo,
string $filepath,
string $message,
string $sha,
?string $branch = null,
?string $authorName = null,
?string $authorEmail = null,
?string $committerName = null,
?string $committerEmail = null,
?string $authorDate = null,
?string $committerDate = null,
?string $newBranch = null,
?bool $signoff = null
): ?object;
/**
* Get the EditorConfig definitions of a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string|null $ref The name of the commit/branch/tag.
*
* @return string|null
* @since 3.2.0
**/
public function editor(string $owner, string $repo, string $filepath, string $ref = null): ?string;
/**
* Get the blob of a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $sha The SHA hash of the blob.
*
* @return object|null
* @since 3.2.0
**/
public function blob(string $owner, string $repo, string $sha): ?object;
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,30 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces;
/**
* PHP Configuration Checker
*
* @since 5.0.2
*/
interface PHPConfigurationCheckerInterface
{
/**
* Check that the required configurations are set for PHP
*
* @return void
* @since 5.0.2
**/
public function run(): void;
}

View File

@ -0,0 +1,97 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces;
use TrueChristianBible\Joomla\Interfaces\Activeregistryinterface;
/**
* The Registry Interface
*
* @since 3.2.0
*/
interface Registryinterface extends Activeregistryinterface
{
/**
* Sets a value into the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function set(string $path, $value): self;
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on $asArray switch.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function add(string $path, $value, ?bool $asArray = null): self;
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $default Optional default value, returned if the internal doesn't exist.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function get(string $path, $default = null);
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function remove(string $path): self;
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function exists(string $path): bool;
/**
* Sets a separator value
*
* @param string|null $value The value to set.
*
* @return self
* @since 3.2.0
*/
public function setSeparator(?string $value): self;
}

View File

@ -45,8 +45,8 @@ final class Load extends Model implements ModelInterface
$table = $this->getTable(); $table = $this->getTable();
} }
// check if this is a valid table // check if this is a valid table (don't touch null)
if (($store = $this->table->get($table, $field, 'store')) !== null) if ($value !== null && ($store = $this->table->get($table, $field, 'store')) !== null)
{ {
// open the value based on the store method // open the value based on the store method
switch($store) switch($store)

View File

@ -16,9 +16,13 @@
/------------------------------------------------------------------------------------------------------*/ /------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Site\Controller; namespace TrueChristianBible\Component\GetBible\Site\Controller;
use Joomla\Input\Input;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Controller\BaseController; use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Router\Route; use Joomla\CMS\Router\Route;
use Joomla\CMS\User\User;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use TrueChristianBible\Joomla\Utilities\StringHelper; use TrueChristianBible\Joomla\Utilities\StringHelper;
@ -34,13 +38,50 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
*/ */
class DisplayController extends BaseController class DisplayController extends BaseController
{ {
/**
* The allowed edit views.
*
* @var array
* @since 4.0.0
*/
protected array $allowed_edit_views = [
];
/**
* The application identity object.
*
* @var User
* @since 4.0.0
*/
protected $identity;
/**
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'default_task', 'model_path', and
* 'view_path' (this list is not meant to be comprehensive).
* @param MVCFactoryInterface|null $factory The factory.
* @param CMSApplication|null $app The Application for the dispatcher
* @param Input|null $input The Input object for the request
*
* @throws \Exception
* @since 3.0.1
*/
public function __construct($config = [], MVCFactoryInterface $factory = null, $app = null, $input = null)
{
$app ??= Factory::getApplication();
$this->identity ??= $app->getIdentity();
parent::__construct($config, $factory, $app, $input);
}
/** /**
* Method to display a view. * Method to display a view.
* *
* @param boolean $cachable If true, the view output will be cached. * @param boolean $cachable If true, the view output will be cached.
* @param boolean $urlparams An array of safe URL parameters and their variable types, for valid values see {@link InputFilter::clean()}. * @param boolean|array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link InputFilter::clean()}.
* *
* @return DisplayController This object to support chaining. * @return DisplayController This object to support chaining.
* @throws \Exception
* @since 1.5 * @since 1.5
*/ */
function display($cachable = false, $urlparams = false) function display($cachable = false, $urlparams = false)
@ -54,14 +95,13 @@ class DisplayController extends BaseController
$cachable = true; $cachable = true;
// ensure that the view is not cashable if edit view or if user is logged in // ensure that the view is not cashable if edit view or if user is logged in
$user = $this->app->getIdentity(); if ($this->identity->get('id') || $this->input->getMethod() === 'POST' || $isEdit)
if ($user->get('id') || $this->input->getMethod() === 'POST' || $isEdit)
{ {
$cachable = false; $cachable = false;
} }
// Check for edit form. // Check for edit form.
if ($isEdit && !$this->checkEditId('com_getbible.edit.'.$view, $id)) if ($isEdit && !$this->checkEditId($view, $id))
{ {
// check if item was opened from other than its own list view // check if item was opened from other than its own list view
$ref = $this->input->getCmd('ref', 0); $ref = $this->input->getCmd('ref', 0);
@ -118,19 +158,133 @@ class DisplayController extends BaseController
return $this; return $this;
} }
protected function checkEditView($view) /**
* Method to check whether an ID is in the edit list.
*
* @param string $context The view name.
* @param integer $id The ID of the record to add to the edit list.
*
* @return boolean True if the ID is in the edit list.
*
* @throws \Exception
* @since 3.0
*/
protected function checkEditId($context, $id)
{
if (parent::checkEditId("com_getbible.edit.{$context}", $id))
{
return true;
}
// check user edit access
if ($this->canEditId($context, $id))
{
$this->holdEditId("com_getbible.edit.{$context}", $id);
return true;
}
return false;
}
/**
* Method to check whether an ID is allowed to be edited by the active user.
*
* @param string $view The view name.
* @param integer $id The ID of the record to add to the edit list.
*
* @return boolean True if the ID is in the edit list.
*
* @since 5.0.2
*/
protected function canEditId($view, $id): bool
{
// check that this view is even allowed
$allowed = $this->getAllowedEditView($view);
if ($allowed === null)
{
return false;
}
// check if this item has custom function set for canEditId
if (isset($allowed['function'])
&& method_exists($this, $allowed['function'])
&& $this->{$allowed['function']}(['id' => $id], 'id'))
{
return true;
}
// check if this item can be accessed (and has access)
$access = true;
if (isset($allowed['access']))
{
$access = ($this->identity->authorise($allowed['access'], "com_getbible.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['access'], 'com_getbible'));
}
// check if this item can be edited
$edit = false;
if ($access && isset($allowed['edit']))
{
$edit = ($this->identity->authorise($allowed['edit'], "com_getbible.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['edit'], 'com_getbible'));
}
// check if this item can be edited by owner
if ($access && !$edit && isset($allowed['edit.own']))
{
$edit = ($this->identity->authorise($allowed['edit.own'], "com_getbible.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['edit.own'], 'com_getbible'));
}
return $edit;
}
/**
* Checks if the provided view is an edit view.
*
* This method verifies whether the given view name is recognized as an edit view.
* It uses the StringHelper::check() method to validate the input and then checks
* against a predefined list of edit views.
*
* @param string|null $view The name of the view to check.
*
* @return bool True if the view is an edit view, false otherwise.
* @since 4.0.0
*/
protected function checkEditView(?string $view): bool
{ {
if (StringHelper::check($view)) if (StringHelper::check($view))
{ {
$views = [ // check if this is an edit view
if (isset($this->allowed_edit_views[$view]))
];
// check if this is a edit view
if (in_array($view,$views))
{ {
return true; return true;
} }
} }
return false; return false;
} }
/**
* Get the allowed edit view permission map
*
* @param string|null $view The name of the view to check.
*
* @return array|null The permissions map
* @since 5.0.2
*/
protected function getAllowedEditView(?string $view): ?array
{
if (StringHelper::check($view))
{
// check if this is an edit view
if (isset($this->allowed_edit_views[$view]))
{
return $this->allowed_edit_views[$view];
}
}
return null;
}
} }

View File

@ -31,11 +31,11 @@ use TrueChristianBible\Component\GetBible\Site\Helper\GetbibleHelper;
use TrueChristianBible\Component\GetBible\Site\Helper\RouteHelper; use TrueChristianBible\Component\GetBible\Site\Helper\RouteHelper;
use Joomla\CMS\Helper\TagsHelper; use Joomla\CMS\Helper\TagsHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper; use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\Component\Helper; use TrueChristianBible\Joomla\Utilities\Component\Helper;
use TrueChristianBible\Joomla\Utilities\GuidHelper; use TrueChristianBible\Joomla\Utilities\GuidHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianBible\Joomla\Utilities\JsonHelper; use TrueChristianBible\Joomla\Utilities\JsonHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
// No direct access to this file // No direct access to this file
\defined('_JEXEC') or die; \defined('_JEXEC') or die;
@ -261,6 +261,13 @@ class TagModel extends ListModel
$this->input ??= Factory::getApplication()->input; $this->input ??= Factory::getApplication()->input;
// we add a Share_His_Word option to set the session key
if (($linker = $this->input->getString('Share_His_Word', null)) !== null
&& GetBibleFactory::_('GetBible.Linker')->valid($linker))
{
GetBibleFactory::_('GetBible.Linker')->trigger($linker);
}
$this->translation = $this->input->getString('t') ?? $this->input->getString('translation', Helper::getParams('com_getbible')->get('default_translation', 'kjv')) ; $this->translation = $this->input->getString('t') ?? $this->input->getString('translation', Helper::getParams('com_getbible')->get('default_translation', 'kjv')) ;
$this->tag = $this->input->getString('guid') ?? ''; $this->tag = $this->input->getString('guid') ?? '';

View File

@ -36,6 +36,7 @@ use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory; use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\StringHelper; use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper; use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file // No direct access to this file
\defined('_JEXEC') or die; \defined('_JEXEC') or die;
@ -47,6 +48,38 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 3.10.11
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 3.10.11
*/
protected array $scripts;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Display the view * Display the view
* *
@ -61,10 +94,10 @@ class HtmlView extends BaseHtmlView
$this->app ??= Factory::getApplication(); $this->app ??= Factory::getApplication();
$this->params = $this->app->getParams(); $this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive(); $this->menu = $this->app->getMenu()->getActive();
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles') ?? [];
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts') ?? [];
// get the user object // get the user object
$this->user ??= $this->app->getIdentity(); $this->user ??= $this->getCurrentUser();
// Initialise variables. // Initialise variables.
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->chapter = $this->get('Chapter'); $this->chapter = $this->get('Chapter');
@ -1101,8 +1134,9 @@ class HtmlView extends BaseHtmlView
{ {
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url); ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = Toolbar::getInstance(); $this->toolbar ??= Toolbar::getInstance();
} }
/** /**

View File

@ -36,6 +36,7 @@ use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Helper\ModuleHelper; use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper; use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper; use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file // No direct access to this file
\defined('_JEXEC') or die; \defined('_JEXEC') or die;
@ -47,6 +48,38 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 3.10.11
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 3.10.11
*/
protected array $scripts;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Display the view * Display the view
* *
@ -61,10 +94,10 @@ class HtmlView extends BaseHtmlView
$this->app ??= Factory::getApplication(); $this->app ??= Factory::getApplication();
$this->params = $this->app->getParams(); $this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive(); $this->menu = $this->app->getMenu()->getActive();
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles') ?? [];
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts') ?? [];
// get the user object // get the user object
$this->user ??= $this->app->getIdentity(); $this->user ??= $this->getCurrentUser();
// Initialise variables. // Initialise variables.
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->translation = $this->get('Translation'); $this->translation = $this->get('Translation');
@ -680,8 +713,9 @@ class HtmlView extends BaseHtmlView
{ {
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url); ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = Toolbar::getInstance(); $this->toolbar ??= Toolbar::getInstance();
} }
/** /**

View File

@ -37,6 +37,7 @@ use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory; use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\StringHelper; use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper; use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file // No direct access to this file
\defined('_JEXEC') or die; \defined('_JEXEC') or die;
@ -48,6 +49,54 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Display the view * Display the view
* *
@ -861,6 +910,7 @@ class HtmlView extends BaseHtmlView
{ {
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url); ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = Toolbar::getInstance(); $this->toolbar = Toolbar::getInstance();
} }

View File

@ -37,6 +37,7 @@ use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory; use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\StringHelper; use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper; use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file // No direct access to this file
\defined('_JEXEC') or die; \defined('_JEXEC') or die;
@ -48,6 +49,54 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/** /**
* Display the view * Display the view
* *
@ -617,6 +666,7 @@ class HtmlView extends BaseHtmlView
{ {
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url); ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = Toolbar::getInstance(); $this->toolbar = Toolbar::getInstance();
} }

View File

@ -296,7 +296,7 @@
<version>5.0.15-alpha</version> <version>5.0.15-alpha</version>
<infourl title="Get Bible!">https://getbible.net</infourl> <infourl title="Get Bible!">https://getbible.net</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v5.0.15-alpha2.zip</downloadurl> <downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v5.0.15-alpha4.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>stable</tag>
@ -311,10 +311,10 @@
<element>pkg_getbible</element> <element>pkg_getbible</element>
<type>package</type> <type>package</type>
<client>site</client> <client>site</client>
<version>5.0.15-alpha3</version> <version>5.0.15-alpha4</version>
<infourl title="Get Bible!">https://getbible.net</infourl> <infourl title="Get Bible!">https://getbible.net</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v5.0.15-alpha3.zip</downloadurl> <downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v5.0.15-alpha4.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>alpha</tag> <tag>alpha</tag>