[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Plugin 5 * @subpackage Fields.Calendar 6 * 7 * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 10 * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace 11 */ 12 13 use Joomla\CMS\Form\Form; 14 15 // phpcs:disable PSR1.Files.SideEffects 16 \defined('_JEXEC') or die; 17 // phpcs:enable PSR1.Files.SideEffects 18 19 /** 20 * Fields Calendar Plugin 21 * 22 * @since 3.7.0 23 */ 24 class PlgFieldsCalendar extends \Joomla\Component\Fields\Administrator\Plugin\FieldsPlugin 25 { 26 /** 27 * Transforms the field into a DOM XML element and appends it as a child on the given parent. 28 * 29 * @param stdClass $field The field. 30 * @param DOMElement $parent The field node parent. 31 * @param Form $form The form. 32 * 33 * @return DOMElement 34 * 35 * @since 3.7.0 36 */ 37 public function onCustomFieldsPrepareDom($field, DOMElement $parent, Form $form) 38 { 39 $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); 40 41 if (!$fieldNode) { 42 return $fieldNode; 43 } 44 45 // Set filter to user UTC 46 $fieldNode->setAttribute('filter', 'USER_UTC'); 47 48 // Set field to use translated formats 49 $fieldNode->setAttribute('translateformat', '1'); 50 $fieldNode->setAttribute('showtime', $field->fieldparams->get('showtime', 0) ? 'true' : 'false'); 51 52 return $fieldNode; 53 } 54 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |