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


PHP JDeveloperLoader::importHelper方法代码示例

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


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

示例1: getFields

 /**
  * Get fields from form file
  *
  * @param	SimpleXMLElement	$form	Form file
  *
  * @return	mixed	Fields array on success, false otherwise
  */
 public function getFields(SimpleXMLElement $form, $table = 0)
 {
     JDeveloperLoader::importHelper("field");
     // Check if xml file contains form information
     if ($form->getName() != "form") {
         return false;
     }
     // Get fields
     $fields = array();
     foreach ($form->fieldset->children() as $_field) {
         $field = array();
         $field["id"] = 0;
         $field["name"] = (string) $_field["name"];
         $field["type"] = (string) $_field["type"];
         $field["table"] = $table;
         $field["label"] = (string) ucfirst($_field["name"]);
         $field["dbtype"] = JDeveloperHelperField::getDbType((string) $_field["type"]);
         $field["rule"] = isset($_field["validate"]) ? (string) $_field["validate"] : "";
         $field["maxlength"] = isset($_field["size"]) ? (string) $_field["size"] : "10";
         $field["params"] = array();
         $field["params"]["class"] = isset($_field["class"]) ? (string) $_field["class"] : "inputbox";
         $field["params"]["default"] = isset($_field["default"]) ? (string) $_field["default"] : "";
         $field["params"]["filter"] = isset($_field["filter"]) ? (string) $_field["filter"] : "";
         $field["params"]["readonly"] = isset($_field["readonly"]) ? "1" : "0";
         $field["params"]["frontend_list"] = "1";
         $field["params"]["frontend_item"] = "1";
         $field["params"]["listfilter"] = "0";
         $field["params"]["searchable"] = "0";
         $field["params"]["sortable"] = "0";
         $fields[] = $field;
     }
     return $fields;
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:40,代码来源:importxml.php

示例2: defined

<?php

/**
 * @package     JDeveloper
 * @subpackage  Create.Component
 *
 * @copyright  	Copyright (C) 2014, Tilo-Lars Flasche. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */
defined('_JEXEC') or die;
JDeveloperLoader::import("component", JDeveloperCREATE);
JDeveloperLoader::importHelper("table");
/**
 * Component Create Class
 *
 * @package     JDeveloper
 * @subpackage  Create.Component
 */
class JDeveloperCreateComponentAdminUpdate extends JDeveloperCreateComponent
{
    protected function condition()
    {
        return !empty($this->tables);
    }
    public function initialize()
    {
        $buffer = array();
        $model = $this->getModel("Field");
        $db = JFactory::getDbo();
        foreach ($this->tables as $table) {
            if (in_array($table->dbname, $db->getTableList())) {
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:31,代码来源:update.php


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