本文整理汇总了PHP中JHtmlBehavior::formvalidation方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlBehavior::formvalidation方法的具体用法?PHP JHtmlBehavior::formvalidation怎么用?PHP JHtmlBehavior::formvalidation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHtmlBehavior
的用法示例。
在下文中一共展示了JHtmlBehavior::formvalidation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/**
* Part of Component Fbimporter files.
*
* @copyright Copyright (C) 2014 Asikart. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
JHtmlBootstrap::tooltip();
JHtmlFormbehavior::chosen('select');
JHtmlBehavior::formvalidation();
/**
* Prepare data for this template.
*
* @var $container Windwalker\DI\Container
* @var $data Windwalker\Data\Data
* @var $item \stdClass
*/
$container = $this->getContainer();
$form = $data->form;
$item = $data->item;
$fieldsets = $data->form->getFieldsets();
?>
<!-- Validate Script -->
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'format.edit.cancel' || document.formvalidator.isValid(document.id('adminForm')))
{
示例2: testFormvalidation
/**
* Tests the formvalidation method.
*
* @return void
*
* @since 3.1
*/
public function testFormvalidation()
{
JHtmlBehavior::formvalidation();
$this->assertEquals(array('JHtmlBehavior::core' => true, 'JHtmlBehavior::framework' => array('core' => true), 'JHtmlBehavior::formvalidator' => true), JHtmlBehaviorInspector::getLoaded(), 'The form validation behavior is not loaded with all dependencies');
}