CoreFiles by mySites.guru
textarea.php47 lines, 1,234 bytes, from Joomla_3.7.0-beta2-Beta-Full_Package.zip
Raw History Compare with 3.7.0-beta1
md5
8b985759b9c9c441f3755c8b427058c3
sha1
94fb02b437b321e65a0b6c11a29554189dc4c093
sha256
b5be420d0e05606ddf8ab6f69269522706b754ab795b655aadf8ec8f2ea2a454
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Textarea
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR);

/**
 * Fields Textarea Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsTextarea extends FieldsPlugin
{
	/**
	 * Transforms the field into an XML element and appends it as child on the given parent. This
	 * is the default implementation of a field. Form fields which do support to be transformed into
	 * an XML Element mut implemet the JFormDomfieldinterface.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('filter', 'JComponentHelper::filterText');

		return $fieldNode;
	}
}

The same content is in 4 releases, Joomla 3.7.0-alpha2 to 3.7.0-beta3. See them all, or every version of this file.