当前位置: 首页>>代码示例>>PHP>>正文


PHP Zikula_Form_View::registerPlugin方法代码示例

本文整理汇总了PHP中Zikula_Form_View::registerPlugin方法的典型用法代码示例。如果您正苦于以下问题:PHP Zikula_Form_View::registerPlugin方法的具体用法?PHP Zikula_Form_View::registerPlugin怎么用?PHP Zikula_Form_View::registerPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zikula_Form_View的用法示例。


在下文中一共展示了Zikula_Form_View::registerPlugin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: smarty_function_formcontextmenureference

/**
 * Context menu reference
 *
 * This plugin creates a context menu reference.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formcontextmenureference($params, $view)
{
    $output = $view->registerPlugin('Zikula_Form_Plugin_ContextMenu_Reference', $params);
    if (array_key_exists('assign', $params)) {
        $view->assign($params['assign'], $output);
    } else {
        return $output;
    }
}
开发者ID:Silwereth,项目名称:core,代码行数:19,代码来源:function.formcontextmenureference.php

示例2: smarty_block_reviewsFormFrame

/**
 * The reviewsFormFrame plugin adds styling <div> elements and a validation summary.
 *
 * Available parameters:
 *   - assign:   If set, the results are assigned to the corresponding variable instead of printed out.
 *
 * @param array            $params  All attributes passed to this function from the template.
 * @param string           $content The content of the block.
 * @param Zikula_Form_View $view    Reference to the view object.
 *
 * @return string The output of the plugin.
 */
function smarty_block_reviewsFormFrame($params, $content, $view)
{
    // As with all Forms plugins, we must remember to register our plugin.
    // In this case we also register a validation summary so we don't have to
    // do that explicitively in the templates.
    // We need to concatenate the output of boths plugins.
    $result = $view->registerPlugin('\\Zikula_Form_Plugin_ValidationSummary', $params);
    $result .= $view->registerBlock('Reviews_Form_Plugin_FormFrame', $params, $content);
    return $result;
}
开发者ID:rmaiwald,项目名称:Reviews,代码行数:22,代码来源:block.reviewsFormFrame.php

示例3: smarty_function_formvalidationsummary

/**
 * Validation summary.
 *
 * This plugin shows a summary of the validation result.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formvalidationsummary($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_ValidationSummary', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:14,代码来源:function.formvalidationsummary.php

示例4: smarty_function_formdropdownrelationlist

/**
 * Dropdown relation list.
 *
 * This plugin creates a drop down list from a relation.
 *
 * This plugin supports doctrine.
 * Example:
 * <code>
 * {formdropdownrelationlist recordClass="MyModule_Model_User" where="active = true"
 *  num=15 oderby="registrationDate DESC"}
 * </code>
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formdropdownrelationlist($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_DropdownRelationlist', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:21,代码来源:function.formdropdownrelationlist.php

示例5: smarty_function_formcontextmenuitem

/**
 * Context menu item.
 *
 * This plugin represents a menu item.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @see    Zikula_Form_Plugin_ContextMenu
 * @return string The rendered output.
 */
function smarty_function_formcontextmenuitem($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_ContextMenu_Item', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:15,代码来源:function.formcontextmenuitem.php

示例6: smarty_function_formuploadinput

/**
 * File upload field.
 *
 * This plugin creates a field for file uploads.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formuploadinput($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_UploadInput', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:14,代码来源:function.formuploadinput.php

示例7: smarty_function_formfloatinput

/**
 * Float input.
 *
 * This plugin creates a float input field
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formfloatinput($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_FloatInput', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:14,代码来源:function.formfloatinput.php

示例8: smarty_function_muvideoItemSelector

/**
 * The muvideoItemSelector plugin provides items for a dropdown selector.
 *
 * @param  array            $params All attributes passed to this function from the template.
 * @param  Zikula_Form_View $view   Reference to the view object.
 *
 * @return string The output of the plugin.
 */
function smarty_function_muvideoItemSelector($params, $view)
{
    return $view->registerPlugin('MUVideo_Form_Plugin_ItemSelector', $params);
}
开发者ID:robbrandt,项目名称:MUVideo,代码行数:12,代码来源:function.muvideoItemSelector.php

示例9: smarty_function_formdateinput

/**
 * Date input for Zikula_Form_View.
 *
 * The date input plugin is a text input plugin that only allows dates to be posted. The value
 * returned from {@link Zikula_Form_View::getValues()} is although a string of the format 'YYYY-MM-DD'
 * since this is the standard internal Zikula format for dates.
 *
 * You can also use all of the features from the Zikula_Form_Plugin_TextInput plugin since the date input
 * inherits from it.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Zikula_Form_View object.
 *
 * @return string The rendered output.
 */
function smarty_function_formdateinput($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_DateInput', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:19,代码来源:function.formdateinput.php

示例10: smarty_function_formcontextmenuseparator

/**
 * Context menu seperator
 *
 * This plugin creates a seperator in a context menu.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formcontextmenuseparator($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_ContextMenu_Separator', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:14,代码来源:function.formcontextmenuseparator.php

示例11: smarty_function_formtextinput

/**
 * TextInput plugin for Zikula_Form_View
 *
 * The Zikula_Form_Plugin_TextInput plugin is a general purpose input plugin that allows the user to enter any kind of character based data,
 * including text, numbers, dates and more.
 *
 * Typical use in template file:
 * <code>
 * {formtextinput id='title' maxLength='100' width='30em'}
 * </code>
 *
 * The Zikula_Form_Plugin_TextInput plugin supports basic CSS styling through attributes like "width", "color" and "font_weight". See
 * {@link Zikula_Form_StyledPlugin} for more info.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Zikula_Form_View object.
 *
 * @return string The rendered output.
 */
function smarty_function_formtextinput($params, $view)
{
    // Let the Zikula_Form_Plugin class do all the hard work
    return $view->registerPlugin('Zikula_Form_Plugin_TextInput', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:24,代码来源:function.formtextinput.php

示例12: smarty_function_formradiobutton

/**
 * Radiobutton plugin
 *
 * Plugin to generate a radiobutton for selecting one-of-X.
 * Usage with fixed number of radiobuttons:
 *
 * <code>
 * {formradiobutton id='yesButton' dataField='ok'} {formlabel __text='Yes' for='yesButton'}<br/>
 * {formradiobutton id='noButton' dataField='ok'} {formlabel __text='No' for='noButton'}
 * </code>
 *
 * The above case sets 'ok' to either 'yesButton' or 'noButton' in the hashtable returned
 * by {@link Zikula_Form_View::getValues()}. As you can see the radiobutton defaults to using the ID for the returned value
 * in the hashtable. You can override this by setting 'value' to something different.
 *
 * You can also enforce a selection:
 *
 * <code>
 * {formradiobutton id='yesButton' dataField='ok' mandatory=true} {formlabel __text='Yes' for='yesButton'}<br/>
 * {formradiobutton id='noButton' dataField='ok' mandatory=true} {formlabel __text='No' for='noButton']-->
 * </code>
 *
 * If you have a list of radiobuttons inside a for/each loop then you can set the ID to something from the data loop
 * like here:
 * <code>
 * {foreach from=$items item=item}
 *   {formradiobutton id=$item.name dataField='item' mandatory=true} {formlabel text=$item.title for=$item.name}
 * {/foreach}
 * </code>
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formradiobutton($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_RadioButton', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:39,代码来源:function.formradiobutton.php

示例13: smarty_function_reviewsItemSelector

/**
 * The reviewsItemSelector plugin provides items for a dropdown selector.
 *
 * @param  array            $params All attributes passed to this function from the template.
 * @param  Zikula_Form_View $view   Reference to the view object.
 *
 * @return string The output of the plugin.
 */
function smarty_function_reviewsItemSelector($params, $view)
{
    return $view->registerPlugin('Reviews_Form_Plugin_ItemSelector', $params);
}
开发者ID:rmaiwald,项目名称:Reviews,代码行数:12,代码来源:function.reviewsItemSelector.php

示例14: smarty_function_muboardColourInput

/**
 * The muboardColourInput plugin handles fields carrying a html colour code.
 * It provides a colour picker for convenient editing.
 *
 * @param  array            $params  All attributes passed to this function from the template.
 * @param  Zikula_Form_View $view    Reference to the view object.
 *
 * @return string The output of the plugin.
 */
function smarty_function_muboardColourInput($params, $view)
{
    return $view->registerPlugin('MUBoard_Form_Plugin_ColourInput', $params);
}
开发者ID:rmaiwald,项目名称:MUBoard,代码行数:13,代码来源:function.muboardColourInput.php

示例15: smarty_function_formlinkbutton

/**
 * LinkButton
 *
 * Link buttons can be used instead of normal buttons to fire command events in
 * your form event handler. A link button is simply a link (anchor tag with
 * some JavaScript) that can be used exactly like a normal button - but with
 * a different visualization.
 *
 * When the user activates a link button the command name and command argument
 * will be sent to the form event handlers handleCommand function.
 * Example:
 * <code>
 *  function handleCommand($render, &$args)
 *  {
 *    if ($args['commandName'] == 'update')
 *    {
 *      if (!$render->isValid())
 *        return false;
 *
 *      $data = $render->getValues();
 *
 *      DBUtil::updateObject($data, 'demo_data');
 *    }
 *
 *    return true;
 *  }
 * </code>
 *
 * The command arguments ($args) passed to the handler contains 'commandName' and
 * 'commandArgument' with the values you passed to the button in the template.
 *
 * @param array            $params Parameters passed in the block tag.
 * @param Zikula_Form_View $view   Reference to Form render object.
 *
 * @return string The rendered output.
 */
function smarty_function_formlinkbutton($params, $view)
{
    return $view->registerPlugin('Zikula_Form_Plugin_LinkButton', $params);
}
开发者ID:Silwereth,项目名称:core,代码行数:40,代码来源:function.formlinkbutton.php


注:本文中的Zikula_Form_View::registerPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。