Release of v3.2.5-alpha3
Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class.
This commit is contained in:
parent
ce55b353ec
commit
a745bb39cd
16
CHANGELOG.md
16
CHANGELOG.md
@ -1,16 +1,20 @@
|
||||
# v3.2.5-alpha2
|
||||
# v3.2.5-alpha3
|
||||
|
||||
- Fix Save failed issue in dynamicGet. #1148
|
||||
- Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]
|
||||
- Add the DateHelper class and improve the date methods.
|
||||
- Add simple SessionHelper class.
|
||||
|
||||
# v3.2.5-alpha
|
||||
|
||||
- Add [AllowDynamicProperties] in the base view class for J5
|
||||
- Move the _prepareDocument above the display call in the base view class
|
||||
- Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run.
|
||||
- Added new import powers for custom import of spreadsheets.
|
||||
- Move the setDocument and _prepareDocument above the display in the site view and custom admin view.
|
||||
- Update the trashhelper layout to work in Joomla 5.
|
||||
- Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues.
|
||||
|
||||
# v3.2.5-alpha
|
||||
|
||||
- Add [AllowDynamicProperties] in the base view class for J5
|
||||
- Move the _prepareDocument above the display call in the base view class
|
||||
|
||||
# v3.2.4
|
||||
|
||||
- Add [push] option to Powers area.
|
||||
|
10
README.md
10
README.md
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,13 +144,13 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 7th October, 2024
|
||||
+ *Version*: 3.2.5-alpha2
|
||||
+ *Last Build*: 13th October, 2024
|
||||
+ *Version*: 3.2.5-alpha3
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **857064**
|
||||
+ *Line count*: **859606**
|
||||
+ *Field count*: **2098**
|
||||
+ *File count*: **5808**
|
||||
+ *File count*: **5826**
|
||||
+ *Folder count*: **505**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
|
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,13 +144,13 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 7th October, 2024
|
||||
+ *Version*: 3.2.5-alpha2
|
||||
+ *Last Build*: 13th October, 2024
|
||||
+ *Version*: 3.2.5-alpha3
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **857064**
|
||||
+ *Line count*: **859606**
|
||||
+ *Field count*: **2098**
|
||||
+ *File count*: **5808**
|
||||
+ *File count*: **5826**
|
||||
+ *Folder count*: **505**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
|
@ -52,6 +52,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as CompilerFactory;
|
||||
use VDM\Joomla\Utilities\Base64Helper;
|
||||
use VDM\Joomla\FOF\Encrypt\AES;
|
||||
use VDM\Joomla\Utilities\DateHelper;
|
||||
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
|
||||
use VDM\Joomla\Utilities\String\FieldHelper as StringFieldHelper;
|
||||
use VDM\Joomla\Utilities\String\TypeHelper;
|
||||
@ -2164,7 +2165,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
|
||||
{
|
||||
self::$session = Factory::getSession();
|
||||
self::$session = Factory::getApplication()->getSession();
|
||||
}
|
||||
// set the defaults
|
||||
self::setSessionDefaults();
|
||||
@ -2177,7 +2178,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
|
||||
{
|
||||
self::$session = Factory::getSession();
|
||||
self::$session = Factory::getApplication()->getSession();
|
||||
}
|
||||
// set to local memory to speed up program
|
||||
self::$localSession[$key] = $value;
|
||||
@ -2192,7 +2193,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
|
||||
{
|
||||
self::$session = Factory::getSession();
|
||||
self::$session = Factory::getApplication()->getSession();
|
||||
}
|
||||
// check if in local memory
|
||||
if (!isset(self::$localSession[$key]))
|
||||
@ -5228,193 +5229,245 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
|
||||
/**
|
||||
* Change to nice fancy date
|
||||
* Convert a date to a human-readable fancy format (e.g., "1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDate($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDate($date, $check_stamp = true)
|
||||
public static function fancyDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('jS \o\f F Y',$date);
|
||||
return DateHelper::fancyDate($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* get date based in period past
|
||||
* Get a formatted date based on the time period (dynamic format based on age of the date).
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDynamicDate($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDynamicDate($date, $check_stamp = true)
|
||||
public static function fancyDynamicDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
// older then year
|
||||
$lastyear = date("Y", strtotime("-1 year"));
|
||||
$tragetyear = date("Y", $date);
|
||||
if ($tragetyear <= $lastyear)
|
||||
{
|
||||
return date('m/d/y', $date);
|
||||
}
|
||||
// same day
|
||||
$yesterday = strtotime("-1 day");
|
||||
if ($date > $yesterday)
|
||||
{
|
||||
return date('g:i A', $date);
|
||||
}
|
||||
// just month day
|
||||
return date('M j', $date);
|
||||
return DateHelper::fancyDynamicDate($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change to nice fancy day time and date
|
||||
* Convert a date to a human-readable day, time, and date format (e.g., "Mon 12am 1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted day, time, and date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDayTimeDate($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDayTimeDate($time, $check_stamp = true)
|
||||
public static function fancyDayTimeDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($time))
|
||||
{
|
||||
$time = strtotime($time);
|
||||
}
|
||||
return date('D ga jS \o\f F Y',$time);
|
||||
return DateHelper::fancyDayTimeDate($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change to nice fancy time and date
|
||||
* Convert a date to a human-readable time and date format (e.g., "(12:00) 1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted time and date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDateTime($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDateTime($time, $check_stamp = true)
|
||||
public static function fancyDateTime($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($time))
|
||||
{
|
||||
$time = strtotime($time);
|
||||
}
|
||||
return date('(G:i) jS \o\f F Y',$time);
|
||||
return DateHelper::fancyDateTime($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change to nice hour:minutes time
|
||||
* Convert a time to a human-readable format (e.g., "12:00").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted time.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyTime($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyTime($time, $check_stamp = true)
|
||||
public static function fancyTime($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($time))
|
||||
{
|
||||
$time = strtotime($time);
|
||||
}
|
||||
return date('G:i',$time);
|
||||
return DateHelper::fancyTime($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date day as Sunday through Saturday
|
||||
* Convert a date to the day name (e.g., "Sunday").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day name.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setDayName($date, $checkStamp);
|
||||
*/
|
||||
public static function setDayName($date, $check_stamp = true)
|
||||
public static function setDayName($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('l', $date);
|
||||
return DateHelper::setDayName($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date month as January through December
|
||||
* Convert a date to the month name (e.g., "January").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Month name.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setMonthName($date, $checkStamp);
|
||||
*/
|
||||
public static function setMonthName($date, $check_stamp = true)
|
||||
public static function setMonthName($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('F', $date);
|
||||
return DateHelper::setMonthName($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date day as 1st
|
||||
* Convert a date to the day with suffix (e.g., "1st").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day with suffix.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setDay($date, $checkStamp);
|
||||
*/
|
||||
public static function setDay($date, $check_stamp = true)
|
||||
public static function setDay($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('jS', $date);
|
||||
return DateHelper::setDay($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date month as 5
|
||||
* Convert a date to the numeric month (e.g., "5").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Numeric month.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setMonth($date, $checkStamp);
|
||||
*/
|
||||
public static function setMonth($date, $check_stamp = true)
|
||||
public static function setMonth($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('n', $date);
|
||||
return DateHelper::setMonth($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date year as 2004 (for charts)
|
||||
* Convert a date to the full year (e.g., "2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Full year.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setYear($date, $checkStamp);
|
||||
*/
|
||||
public static function setYear($date, $check_stamp = true)
|
||||
public static function setYear($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('Y', $date);
|
||||
return DateHelper::setYear($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date as 2004/05 (for charts)
|
||||
* Convert a date to a year/month format (e.g., "2024/05").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Year/Month format.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setYearMonth($date, $spacer, $checkStamp);
|
||||
*/
|
||||
public static function setYearMonth($date, $spacer = '/', $check_stamp = true)
|
||||
public static function setYearMonth($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('Y' . $spacer . 'm', $date);
|
||||
return DateHelper::setYearMonth($date, $spacer, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date as 2004/05/03 (for charts)
|
||||
* Convert a date to a year/month/day format (e.g., "2024/05/03").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Year/Month/Day format.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
|
||||
*/
|
||||
public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true)
|
||||
public static function setYearMonthDay($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('Y' . $spacer . 'm' . $spacer . 'd', $date);
|
||||
return DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date as 03/05/2004
|
||||
* Convert a date to a day/month/year format (e.g., "03/05/2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day/Month/Year format.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
|
||||
*/
|
||||
public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true)
|
||||
public static function setDayMonthYear($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('d' . $spacer . 'm' . $spacer . 'Y', $date);
|
||||
return DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if string is a valid time stamp
|
||||
* Convert a date string to a valid timestamp.
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return int The valid timestamp.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::getValidTimestamp($date, $checkStamp);
|
||||
*/
|
||||
public static function isValidTimeStamp($timestamp)
|
||||
public static function getValidTimestamp($date, bool $checkStamp): int
|
||||
{
|
||||
return ((int) $timestamp === $timestamp)
|
||||
&& ($timestamp <= PHP_INT_MAX)
|
||||
&& ($timestamp >= ~PHP_INT_MAX);
|
||||
return DateHelper::getValidTimestamp($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if string is a valid date
|
||||
* https://www.php.net/manual/en/function.checkdate.php#113205
|
||||
* Check if the input is a valid Unix timestamp.
|
||||
*
|
||||
* @param mixed $timestamp The timestamp to validate.
|
||||
*
|
||||
* @return bool True if valid timestamp, false otherwise.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::isValidTimeStamp($timestamp);
|
||||
*/
|
||||
public static function isValidateDate($date, $format = 'Y-m-d H:i:s')
|
||||
public static function isValidTimeStamp($timestamp): bool
|
||||
{
|
||||
$d = DateTime::createFromFormat($format, $date);
|
||||
return $d && $d->format($format) == $date;
|
||||
return DateHelper::isValidTimeStamp($timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a string is a valid date according to the specified format.
|
||||
*
|
||||
* @param string $date The date string to validate.
|
||||
* @param string $format The format to check against (default is 'Y-m-d H:i:s').
|
||||
*
|
||||
* @return bool True if valid date, false otherwise.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::isValidateDate($date, $format);
|
||||
*/
|
||||
public static function isValidateDate($date, string $format = 'Y-m-d H:i:s'): bool
|
||||
{
|
||||
return DateHelper::isValidateDate($date, $format);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4126,9 +4126,9 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_DESCRIPTION="The end hash target
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_HINT="autogenerated md5 hash"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_LABEL="End Hash Target"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_MESSAGE="Error! Please add some text here."
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The start hash target to help insert the code at the correct place, if the line position change. This hash is the md5 of a few lines above the custom code"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The end hash target to help insert the code until the correct place, if the line position change. This hash is the md5 of a few lines below the custom code"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_HINT="autogenerated md5 hash"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="Start Hash Target"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="End Hash Target"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_MESSAGE="Error! Please add some text here."
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HASH_AUTOMATION="Hash (automation)"
|
||||
COM_COMPONENTBUILDER_CUSTOM_CODE_HTML="HTML"
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -114,7 +115,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -122,17 +123,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -187,7 +188,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -195,17 +196,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -263,7 +264,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -271,17 +272,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -612,7 +613,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -620,17 +621,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// update the fields
|
||||
@ -1016,7 +1017,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\Base64Helper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
@ -1595,7 +1596,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
* @var array
|
||||
* @since 3.0.13
|
||||
*/
|
||||
protected $viewid = [];
|
||||
protected array $viewid = [];
|
||||
|
||||
/**
|
||||
* Get the view details via the session
|
||||
@ -1615,7 +1616,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
if ($vdm)
|
||||
{
|
||||
// set view and id
|
||||
if ($view = ComponentbuilderHelper::get($vdm))
|
||||
if (($view = SessionHelper::get($vdm)) !== null)
|
||||
{
|
||||
$current = (array) explode('__', $view);
|
||||
if (StringHelper::check($current[0]) && isset($current[1]) && is_numeric($current[1]))
|
||||
@ -1628,7 +1629,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
}
|
||||
}
|
||||
// set GUID if found
|
||||
if (($guid = ComponentbuilderHelper::get($vdm . '__guid')) !== false)
|
||||
if (($guid = SessionHelper::get($vdm . '__guid')) !== null)
|
||||
{
|
||||
if (GuidHelper::valid($guid))
|
||||
{
|
||||
@ -1636,7 +1637,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
}
|
||||
}
|
||||
// set return if found
|
||||
if (($return = ComponentbuilderHelper::get($vdm . '__return')) !== false)
|
||||
if (($return = SessionHelper::get($vdm . '__return')) !== null)
|
||||
{
|
||||
if (StringHelper::check($return))
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -118,7 +119,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -126,17 +127,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -195,7 +196,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -203,17 +204,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -122,7 +123,7 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -130,17 +131,17 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -205,7 +206,7 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -213,17 +214,17 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -554,7 +555,7 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -119,7 +120,7 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -127,17 +128,17 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -196,7 +197,7 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -204,17 +205,17 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -545,7 +546,7 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -122,7 +123,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -130,17 +131,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -201,7 +202,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -209,17 +210,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// update the fields
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -123,7 +124,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -131,17 +132,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,7 +215,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -222,17 +223,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -180,7 +181,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -188,17 +189,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -349,7 +350,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -357,17 +358,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -134,7 +135,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -142,17 +143,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
SessionHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -205,7 +206,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -213,17 +214,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
SessionHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -547,7 +548,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -174,7 +175,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
|
||||
if (($vdm = SessionHelper::get('dynamic_get__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -182,17 +183,17 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -349,7 +350,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
|
||||
if (($vdm = SessionHelper::get('dynamic_get__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -357,17 +358,17 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
@ -738,7 +739,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -167,7 +168,7 @@ class ComponentbuilderModelField extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('field__'.$id))
|
||||
if (($vdm = SessionHelper::get('field__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -175,17 +176,17 @@ class ComponentbuilderModelField extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
SessionHelper::set('field__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -286,7 +287,7 @@ class ComponentbuilderModelField extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('field__'.$id))
|
||||
if (($vdm = SessionHelper::get('field__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -294,17 +295,17 @@ class ComponentbuilderModelField extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
SessionHelper::set('field__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -633,7 +634,7 @@ class ComponentbuilderModelField extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -141,7 +142,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
|
||||
if (($vdm = SessionHelper::get('fieldtype__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -149,17 +150,17 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
SessionHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,7 +215,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
|
||||
if (($vdm = SessionHelper::get('fieldtype__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -222,17 +223,17 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
SessionHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// check what type of properties array we have here (should be subform... but just incase)
|
||||
@ -813,7 +814,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@ -171,7 +170,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL"
|
||||
rows="20"
|
||||
cols="30"
|
||||
default=""
|
||||
class="text_area tab_html"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@ -184,7 +183,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_LABEL"
|
||||
rows="20"
|
||||
cols="40"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_DESCRIPTION"
|
||||
class="text_area ids_selection"
|
||||
filter="raw"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@ -156,7 +155,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@ -329,7 +329,6 @@
|
||||
label="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_LABEL"
|
||||
rows="2"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_DESCRIPTION"
|
||||
message="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_MESSAGE"
|
||||
class="text_area span12"
|
||||
|
@ -140,7 +140,6 @@
|
||||
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@ -140,7 +140,6 @@
|
||||
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@ -163,7 +163,6 @@
|
||||
label="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_LABEL"
|
||||
rows="15"
|
||||
cols="5"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_DESCRIPTION"
|
||||
class="input-xxlarge span12"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_HINT"
|
||||
|
@ -433,7 +433,7 @@ class ComponentbuilderModelHelp_document extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -298,7 +299,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_component__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -306,17 +307,17 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
SessionHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -528,7 +529,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_component__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -536,17 +537,17 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
SessionHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
@ -919,7 +920,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -204,7 +205,7 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_module__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_module__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -212,17 +213,17 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
SessionHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -377,7 +378,7 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_module__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_module__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -385,17 +386,17 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
SessionHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -181,7 +182,7 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_plugin__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -189,17 +190,17 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -342,7 +343,7 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_plugin__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -350,17 +351,17 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -114,7 +115,7 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('language_translation__'.$id))
|
||||
if (($vdm = SessionHelper::get('language_translation__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -122,17 +123,17 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
SessionHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -193,7 +194,7 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('language_translation__'.$id))
|
||||
if (($vdm = SessionHelper::get('language_translation__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -201,17 +202,17 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
SessionHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -136,7 +137,7 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
|
||||
if (($vdm = SessionHelper::get('layout__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -144,17 +145,17 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
SessionHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -221,7 +222,7 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
|
||||
if (($vdm = SessionHelper::get('layout__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -229,17 +230,17 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
SessionHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -152,7 +153,7 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('library__'.$id))
|
||||
if (($vdm = SessionHelper::get('library__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -160,17 +161,17 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
SessionHelper::set('library__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -239,7 +240,7 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('library__'.$id))
|
||||
if (($vdm = SessionHelper::get('library__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -247,17 +248,17 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
SessionHelper::set('library__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -569,7 +570,7 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -116,7 +117,7 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('placeholder__'.$id))
|
||||
if (($vdm = SessionHelper::get('placeholder__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -124,17 +125,17 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
ComponentbuilderHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
SessionHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -187,7 +188,7 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('placeholder__'.$id))
|
||||
if (($vdm = SessionHelper::get('placeholder__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -195,17 +196,17 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
ComponentbuilderHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
SessionHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -162,7 +163,7 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('power__'.$id))
|
||||
if (($vdm = SessionHelper::get('power__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -170,17 +171,17 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
SessionHelper::set('power__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -307,7 +308,7 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('power__'.$id))
|
||||
if (($vdm = SessionHelper::get('power__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -315,17 +316,17 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
SessionHelper::set('power__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ class ComponentbuilderModelServer extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -183,7 +184,7 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('site_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('site_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -191,17 +192,17 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
SessionHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -352,7 +353,7 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('site_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('site_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -360,17 +361,17 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
SessionHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -136,7 +137,7 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
|
||||
if (($vdm = SessionHelper::get('template__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -144,17 +145,17 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
SessionHelper::set('template__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -221,7 +222,7 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
|
||||
if (($vdm = SessionHelper::get('template__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -229,17 +230,17 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
SessionHelper::set('template__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@ -119,7 +120,7 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('validation_rule__'.$id))
|
||||
if (($vdm = SessionHelper::get('validation_rule__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -127,17 +128,17 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
ComponentbuilderHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
SessionHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -190,7 +191,7 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('validation_rule__'.$id))
|
||||
if (($vdm = SessionHelper::get('validation_rule__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@ -198,17 +199,17 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
ComponentbuilderHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
SessionHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -166,8 +166,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
<?php elseif ($canDo->get($_button['view'].'.create')): ?>
|
||||
<a class="hasTooltip btn btn-mini" href="index.php?option=com_componentbuilder&view=<?php echo $_button['views'] ?>&task=<?php echo $_button['view'] ?>.edit&ref=joomla_component&refid=<?php echo $item->id; ?>&return=<?php echo $this->return_here; ?>" title="<?php echo $_button['title']; ?>" ><span class="icon-<?php echo $_button['icon']; ?>"></span></a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.10" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>7th October, 2024</creationDate>
|
||||
<creationDate>13th October, 2024</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>3.2.5-alpha2</version>
|
||||
<version>3.2.5-alpha3</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.3.2.5-alpha2)</h1>
|
||||
<h1>Component Builder (v.3.2.5-alpha3)</h1>
|
||||
<div style="clear: both;"></div>
|
||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -205,7 +205,7 @@
|
||||
<version>3.2.5-alpha</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.5-alpha2.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.5-alpha3.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>alpha</tag>
|
||||
@ -220,10 +220,10 @@
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>3.2.5-alpha2</version>
|
||||
<version>3.2.5-alpha3</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.5-alpha2.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.5-alpha3.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>alpha</tag>
|
||||
|
@ -17300,7 +17300,7 @@ class Interpretation extends Fields
|
||||
. "\$form->setFieldAttribute(\$requiredField, 'required', 'false');";
|
||||
$fix .= PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " also clear the data set";
|
||||
$fix .= PHP_EOL . Indent::_(5) . "\$data[\$requiredField] = '';";
|
||||
$fix .= PHP_EOL . Indent::_(5) . "unset(\$data[\$requiredField]);";
|
||||
$fix .= PHP_EOL . Indent::_(4) . "}";
|
||||
$fix .= PHP_EOL . Indent::_(3) . "}";
|
||||
$fix .= PHP_EOL . Indent::_(2) . "}";
|
||||
|
File diff suppressed because it is too large
Load Diff
294
libraries/vendor_jcb/VDM.Joomla/src/Utilities/DateHelper.php
Normal file
294
libraries/vendor_jcb/VDM.Joomla/src/Utilities/DateHelper.php
Normal file
@ -0,0 +1,294 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2020
|
||||
* @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 VDM\Joomla\Utilities;
|
||||
|
||||
|
||||
/**
|
||||
* Simple Date Helper
|
||||
*
|
||||
* @since 5.0.2
|
||||
*/
|
||||
abstract class DateHelper
|
||||
{
|
||||
/**
|
||||
* Convert a date to a human-readable fancy format (e.g., "1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted date.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function fancyDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('jS \o\f F Y', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a formatted date based on the time period (dynamic format based on age of the date).
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted date.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function fancyDynamicDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
// If older than a year, use m/d/y format.
|
||||
if (date('Y', $date) < date('Y', strtotime('-1 year')))
|
||||
{
|
||||
return date('m/d/y', $date);
|
||||
}
|
||||
|
||||
// If it's the same day, return the time.
|
||||
if ($date > strtotime('-1 day'))
|
||||
{
|
||||
return date('g:i A', $date);
|
||||
}
|
||||
|
||||
// Otherwise, return the month and day.
|
||||
return date('M j', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to a human-readable day, time, and date format (e.g., "Mon 12am 1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted day, time, and date.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function fancyDayTimeDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('D gA jS \o\f F Y', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to a human-readable time and date format (e.g., "(12:00) 1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted time and date.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function fancyDateTime($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('(G:i) jS \o\f F Y', $time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a time to a human-readable format (e.g., "12:00").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted time.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function fancyTime($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('G:i', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to the day name (e.g., "Sunday").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day name.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setDayName($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('l', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to the month name (e.g., "January").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Month name.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setMonthName($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('F', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to the day with suffix (e.g., "1st").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day with suffix.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setDay($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('jS', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to the numeric month (e.g., "5").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Numeric month.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setMonth($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('n', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to the full year (e.g., "2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Full year.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setYear($date, bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('Y', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to a year/month format (e.g., "2024/05").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Year/Month format.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setYearMonth($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('Y' . $spacer . 'm', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to a year/month/day format (e.g., "2024/05/03").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Year/Month/Day format.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setYearMonthDay($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('Y' . $spacer . 'm' . $spacer . 'd', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date to a day/month/year format (e.g., "03/05/2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day/Month/Year format.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function setDayMonthYear($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
$date = static::getValidTimestamp($date, $checkStamp);
|
||||
|
||||
return date('d' . $spacer . 'm' . $spacer . 'Y', $date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a date string to a valid timestamp.
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return int The valid timestamp.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function getValidTimestamp($date, bool $checkStamp): int
|
||||
{
|
||||
if ($checkStamp && !static::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date ?? 'Now');
|
||||
}
|
||||
|
||||
return (int) $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the input is a valid Unix timestamp.
|
||||
*
|
||||
* @param mixed $timestamp The timestamp to validate.
|
||||
*
|
||||
* @return bool True if valid timestamp, false otherwise.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function isValidTimeStamp($timestamp): bool
|
||||
{
|
||||
return (is_numeric($timestamp) && (int) $timestamp == $timestamp && $timestamp > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a string is a valid date according to the specified format.
|
||||
*
|
||||
* @param string $date The date string to validate.
|
||||
* @param string $format The format to check against (default is 'Y-m-d H:i:s').
|
||||
*
|
||||
* @return bool True if valid date, false otherwise.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public static function isValidateDate($date, string $format = 'Y-m-d H:i:s'): bool
|
||||
{
|
||||
$d = \DateTime::createFromFormat($format, $date);
|
||||
|
||||
return $d && $d->format($format) === $date;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2020
|
||||
* @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 VDM\Joomla\Utilities;
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
|
||||
/**
|
||||
* Simple Session
|
||||
*
|
||||
* @since 5.0.2
|
||||
*/
|
||||
abstract class SessionHelper
|
||||
{
|
||||
/**
|
||||
* The active session
|
||||
*
|
||||
* @var Session|null
|
||||
* @since 5.0.2
|
||||
*/
|
||||
private static ?Session $session = null;
|
||||
|
||||
/**
|
||||
* Get the active session
|
||||
*
|
||||
* @return Session
|
||||
* @throws \RuntimeException if the session cannot be loaded
|
||||
* @since 5.0.2
|
||||
*/
|
||||
public static function session(): Session
|
||||
{
|
||||
if (static::$session === null)
|
||||
{
|
||||
try {
|
||||
static::$session = Factory::getApplication()->getSession();
|
||||
} catch (\Exception $e) {
|
||||
// Rethrow the exception as a RuntimeException to propagate it downstream
|
||||
throw new \RuntimeException('Unable to load the session.', 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
return static::$session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data from the session store
|
||||
*
|
||||
* @param string $name Name of a variable
|
||||
* @param mixed $default Default value of a variable if not set
|
||||
*
|
||||
* @return mixed Value of the variable from the session
|
||||
* @since 5.0.2
|
||||
*/
|
||||
public static function get(string $name, $default = null)
|
||||
{
|
||||
$value = static::session()->get($name, $default);
|
||||
|
||||
// Ensure the value is set in the session even if it was default
|
||||
static::set($name, $value);
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set data into the session store
|
||||
*
|
||||
* @param string $name Name of a variable
|
||||
* @param mixed $value Value of a variable
|
||||
*
|
||||
* @return mixed Old value of the variable
|
||||
* @since 5.0.2
|
||||
*/
|
||||
public static function set(string $name, $value = null)
|
||||
{
|
||||
return static::session()->set($name, $value);
|
||||
}
|
||||
}
|
||||
|
@ -10001,7 +10001,7 @@ class Com_ComponentbuilderInstallerScript
|
||||
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
|
||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 3.2.5-alpha2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
<h3>Upgrade to Version 3.2.5-alpha3 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
|
||||
// Set db if not set already.
|
||||
if (!isset($db))
|
||||
|
@ -49,6 +49,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as CompilerFactory;
|
||||
use VDM\Joomla\Utilities\Base64Helper;
|
||||
use VDM\Joomla\FOF\Encrypt\AES;
|
||||
use VDM\Joomla\Utilities\DateHelper;
|
||||
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
|
||||
use VDM\Joomla\Utilities\String\FieldHelper as StringFieldHelper;
|
||||
use VDM\Joomla\Utilities\String\TypeHelper;
|
||||
@ -2161,7 +2162,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
|
||||
{
|
||||
self::$session = Factory::getSession();
|
||||
self::$session = Factory::getApplication()->getSession();
|
||||
}
|
||||
// set the defaults
|
||||
self::setSessionDefaults();
|
||||
@ -2174,7 +2175,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
|
||||
{
|
||||
self::$session = Factory::getSession();
|
||||
self::$session = Factory::getApplication()->getSession();
|
||||
}
|
||||
// set to local memory to speed up program
|
||||
self::$localSession[$key] = $value;
|
||||
@ -2189,7 +2190,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
|
||||
{
|
||||
self::$session = Factory::getSession();
|
||||
self::$session = Factory::getApplication()->getSession();
|
||||
}
|
||||
// check if in local memory
|
||||
if (!isset(self::$localSession[$key]))
|
||||
@ -5225,193 +5226,245 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
|
||||
/**
|
||||
* Change to nice fancy date
|
||||
* Convert a date to a human-readable fancy format (e.g., "1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDate($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDate($date, $check_stamp = true)
|
||||
public static function fancyDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('jS \o\f F Y',$date);
|
||||
return DateHelper::fancyDate($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* get date based in period past
|
||||
* Get a formatted date based on the time period (dynamic format based on age of the date).
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDynamicDate($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDynamicDate($date, $check_stamp = true)
|
||||
public static function fancyDynamicDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
// older then year
|
||||
$lastyear = date("Y", strtotime("-1 year"));
|
||||
$tragetyear = date("Y", $date);
|
||||
if ($tragetyear <= $lastyear)
|
||||
{
|
||||
return date('m/d/y', $date);
|
||||
}
|
||||
// same day
|
||||
$yesterday = strtotime("-1 day");
|
||||
if ($date > $yesterday)
|
||||
{
|
||||
return date('g:i A', $date);
|
||||
}
|
||||
// just month day
|
||||
return date('M j', $date);
|
||||
return DateHelper::fancyDynamicDate($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change to nice fancy day time and date
|
||||
* Convert a date to a human-readable day, time, and date format (e.g., "Mon 12am 1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted day, time, and date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDayTimeDate($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDayTimeDate($time, $check_stamp = true)
|
||||
public static function fancyDayTimeDate($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($time))
|
||||
{
|
||||
$time = strtotime($time);
|
||||
}
|
||||
return date('D ga jS \o\f F Y',$time);
|
||||
return DateHelper::fancyDayTimeDate($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change to nice fancy time and date
|
||||
* Convert a date to a human-readable time and date format (e.g., "(12:00) 1st of January 2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted time and date.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyDateTime($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyDateTime($time, $check_stamp = true)
|
||||
public static function fancyDateTime($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($time))
|
||||
{
|
||||
$time = strtotime($time);
|
||||
}
|
||||
return date('(G:i) jS \o\f F Y',$time);
|
||||
return DateHelper::fancyDateTime($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change to nice hour:minutes time
|
||||
* Convert a time to a human-readable format (e.g., "12:00").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Formatted time.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::fancyTime($date, $checkStamp);
|
||||
*/
|
||||
public static function fancyTime($time, $check_stamp = true)
|
||||
public static function fancyTime($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($time))
|
||||
{
|
||||
$time = strtotime($time);
|
||||
}
|
||||
return date('G:i',$time);
|
||||
return DateHelper::fancyTime($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date day as Sunday through Saturday
|
||||
* Convert a date to the day name (e.g., "Sunday").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day name.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setDayName($date, $checkStamp);
|
||||
*/
|
||||
public static function setDayName($date, $check_stamp = true)
|
||||
public static function setDayName($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('l', $date);
|
||||
return DateHelper::setDayName($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date month as January through December
|
||||
* Convert a date to the month name (e.g., "January").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Month name.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setMonthName($date, $checkStamp);
|
||||
*/
|
||||
public static function setMonthName($date, $check_stamp = true)
|
||||
public static function setMonthName($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('F', $date);
|
||||
return DateHelper::setMonthName($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date day as 1st
|
||||
* Convert a date to the day with suffix (e.g., "1st").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day with suffix.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setDay($date, $checkStamp);
|
||||
*/
|
||||
public static function setDay($date, $check_stamp = true)
|
||||
public static function setDay($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('jS', $date);
|
||||
return DateHelper::setDay($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date month as 5
|
||||
* Convert a date to the numeric month (e.g., "5").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Numeric month.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setMonth($date, $checkStamp);
|
||||
*/
|
||||
public static function setMonth($date, $check_stamp = true)
|
||||
public static function setMonth($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('n', $date);
|
||||
return DateHelper::setMonth($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date year as 2004 (for charts)
|
||||
* Convert a date to the full year (e.g., "2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Full year.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setYear($date, $checkStamp);
|
||||
*/
|
||||
public static function setYear($date, $check_stamp = true)
|
||||
public static function setYear($date, bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('Y', $date);
|
||||
return DateHelper::setYear($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date as 2004/05 (for charts)
|
||||
* Convert a date to a year/month format (e.g., "2024/05").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Year/Month format.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setYearMonth($date, $spacer, $checkStamp);
|
||||
*/
|
||||
public static function setYearMonth($date, $spacer = '/', $check_stamp = true)
|
||||
public static function setYearMonth($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('Y' . $spacer . 'm', $date);
|
||||
return DateHelper::setYearMonth($date, $spacer, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date as 2004/05/03 (for charts)
|
||||
* Convert a date to a year/month/day format (e.g., "2024/05/03").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Year/Month/Day format.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
|
||||
*/
|
||||
public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true)
|
||||
public static function setYearMonthDay($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('Y' . $spacer . 'm' . $spacer . 'd', $date);
|
||||
return DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the date as 03/05/2004
|
||||
* Convert a date to a day/month/year format (e.g., "03/05/2024").
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param string $spacer The spacer between year and month.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return string Day/Month/Year format.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
|
||||
*/
|
||||
public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true)
|
||||
public static function setDayMonthYear($date, string $spacer = '/', bool $checkStamp = true): string
|
||||
{
|
||||
if ($check_stamp && !self::isValidTimeStamp($date))
|
||||
{
|
||||
$date = strtotime($date);
|
||||
}
|
||||
return date('d' . $spacer . 'm' . $spacer . 'Y', $date);
|
||||
return DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if string is a valid time stamp
|
||||
* Convert a date string to a valid timestamp.
|
||||
*
|
||||
* @param string|int $date The date as a string or timestamp.
|
||||
* @param bool $checkStamp Whether to check if the input is a timestamp.
|
||||
*
|
||||
* @return int The valid timestamp.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::getValidTimestamp($date, $checkStamp);
|
||||
*/
|
||||
public static function isValidTimeStamp($timestamp)
|
||||
public static function getValidTimestamp($date, bool $checkStamp): int
|
||||
{
|
||||
return ((int) $timestamp === $timestamp)
|
||||
&& ($timestamp <= PHP_INT_MAX)
|
||||
&& ($timestamp >= ~PHP_INT_MAX);
|
||||
return DateHelper::getValidTimestamp($date, $checkStamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if string is a valid date
|
||||
* https://www.php.net/manual/en/function.checkdate.php#113205
|
||||
* Check if the input is a valid Unix timestamp.
|
||||
*
|
||||
* @param mixed $timestamp The timestamp to validate.
|
||||
*
|
||||
* @return bool True if valid timestamp, false otherwise.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::isValidTimeStamp($timestamp);
|
||||
*/
|
||||
public static function isValidateDate($date, $format = 'Y-m-d H:i:s')
|
||||
public static function isValidTimeStamp($timestamp): bool
|
||||
{
|
||||
$d = DateTime::createFromFormat($format, $date);
|
||||
return $d && $d->format($format) == $date;
|
||||
return DateHelper::isValidTimeStamp($timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a string is a valid date according to the specified format.
|
||||
*
|
||||
* @param string $date The date string to validate.
|
||||
* @param string $format The format to check against (default is 'Y-m-d H:i:s').
|
||||
*
|
||||
* @return bool True if valid date, false otherwise.
|
||||
* @since 3.0.0
|
||||
* @deprecated 4.0.0 Use DateHelper::isValidateDate($date, $format);
|
||||
*/
|
||||
public static function isValidateDate($date, string $format = 'Y-m-d H:i:s'): bool
|
||||
{
|
||||
return DateHelper::isValidateDate($date, $format);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user