first commit
This commit is contained in:
34
plugins/system/jlsitemap_cron/fields/date.php
Normal file
34
plugins/system/jlsitemap_cron/fields/date.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* @package System - JLSitemap Cron Plugin
|
||||
* @version 1.12.0
|
||||
* @author Joomline - joomline.ru
|
||||
* @copyright Copyright (c) 2010 - 2022 Joomline. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
* @link https://joomline.ru/
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Form\FormField;
|
||||
|
||||
class JFormFieldDate extends FormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 1.0.1
|
||||
*/
|
||||
protected $type = 'date';
|
||||
|
||||
/**
|
||||
* Name of the layout being used to render the field
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 1.0.1
|
||||
*/
|
||||
protected $layout = 'plugins.system.jlsitemap_cron.fields.date';
|
||||
}
|
||||
46
plugins/system/jlsitemap_cron/fields/key.php
Normal file
46
plugins/system/jlsitemap_cron/fields/key.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @package System - JLSitemap Cron Plugin
|
||||
* @version 1.12.0
|
||||
* @author Joomline - joomline.ru
|
||||
* @copyright Copyright (c) 2010 - 2022 Joomline. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
* @link https://joomline.ru/
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Form\FormField;
|
||||
|
||||
class JFormFieldKey extends FormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 0.0.2
|
||||
*/
|
||||
protected $type = 'key';
|
||||
|
||||
/**
|
||||
* Name of the layout being used to render the field
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 0.0.2
|
||||
*/
|
||||
protected $layout = 'plugins.system.jlsitemap_cron.fields.key';
|
||||
|
||||
/**
|
||||
* Method to get the field label markup.
|
||||
*
|
||||
* @return string The field label markup.
|
||||
*
|
||||
* @since 0.0.2
|
||||
*/
|
||||
protected function getLabel()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
59
plugins/system/jlsitemap_cron/fields/link.php
Normal file
59
plugins/system/jlsitemap_cron/fields/link.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @package System - JLSitemap Cron Plugin
|
||||
* @version 1.12.0
|
||||
* @author Joomline - joomline.ru
|
||||
* @copyright Copyright (c) 2010 - 2022 Joomline. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
* @link https://joomline.ru/
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Application\SiteApplication;
|
||||
use Joomla\CMS\Form\FormField;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
class JFormFieldLink extends FormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 0.0.2
|
||||
*/
|
||||
protected $type = 'link';
|
||||
|
||||
/**
|
||||
* Name of the layout being used to render the field
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 0.0.2
|
||||
*/
|
||||
protected $layout = 'plugins.system.jlsitemap_cron.fields.link';
|
||||
|
||||
/**
|
||||
* Method to get the data to be passed to the layout for rendering.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 0.0.2
|
||||
*/
|
||||
protected function getLayoutData()
|
||||
{
|
||||
$site = SiteApplication::getInstance('site');
|
||||
$router = $site->getRouter();
|
||||
$root = Uri::getInstance()->toString(array('scheme', 'host', 'port'));
|
||||
$link = 'index.php?option=com_ajax&plugin=jlsitemap_cron&group=system&format=raw';
|
||||
$link = $router->build($link)->toString();
|
||||
$link = str_replace('/?', '?', $link);
|
||||
$link = $root . $link;
|
||||
|
||||
$data = parent::getLayoutData();
|
||||
$data['link'] = $link;
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user