本文整理汇总了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;
}
示例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())) {