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


PHP Application::getWyfHome方法代码示例

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


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

示例1: __construct

 public function __construct($buttons = array())
 {
     if ($GLOBALS['toolbar_stylesheet'] === false) {
         Application::preAddStylesheet("css/toolbar.css", Application::getWyfHome("toolbar/"));
     } else {
         Application::preAddStylesheet($GLOBALS['toolbar_stylesheet']);
     }
     $this->buttons = $buttons;
 }
开发者ID:ekowabaka,项目名称:wyf,代码行数:9,代码来源:Toolbar.php

示例2: __construct

 public function __construct($prefix, $headers = null, $data = null, $operations = null, $headerParams = null)
 {
     if (class_exists("Application")) {
         Application::addStyleSheet("/tapi.css", Application::getWyfHome('tapi/css'));
     }
     $this->prefix = $prefix;
     $this->headers = $headers;
     $this->data = $data;
     $this->operations = $operations;
 }
开发者ID:nthc,项目名称:cfx,代码行数:10,代码来源:Table.php

示例3: __construct

 public function __construct($prefix, $headers = null, $data = null, $operations = null, $headerParams = null)
 {
     if ($GLOBALS['fapi_stylesheet'] === false) {
         Application::preAddStylesheet("css/tapi.css", Application::getWyfHome("tapi/"));
     } else {
         Application::preAddStylesheet($GLOBALS['tapi_stylesheet']);
     }
     $this->prefix = $prefix;
     $this->headers = $headers;
     $this->data = $data;
     $this->operations = $operations;
 }
开发者ID:ekowabaka,项目名称:wyf,代码行数:12,代码来源:Table.php

示例4: add_include_path

add_include_path($directoryPath . "constraints", false);
add_include_path($directoryPath . "login", false);
add_include_path($directoryPath . "logout", false);
add_include_path($directoryPath . "password_history", false);
add_include_path($directoryPath . "role_validity", false);
add_include_path($directoryPath . "roles", false);
add_include_path($directoryPath . "users", false);
add_include_path($directoryPath . "users_roles", false);
//Add lib for auth
add_include_path(__DIR__ . "/lib", false);
// Load the applications configuration file and define the home
require "app/config.php";
define("SOFTWARE_HOME", $config['home']);
// Add the script which contains the third party libraries
require "app/includes.php";
// Setup the global variables needed by the redirected packages
global $redirectedPackage;
global $packageSchema;
$selected = getenv('CFX_SELECTED_DATABASE') !== false ? getenv('CFX_SELECTED_DATABASE') : $selected;
// Setup the database driver and other boilerplate stuff
$dbDriver = $config['db'][$selected]['driver'];
$dbDriverClass = Application::camelize($dbDriver);
add_include_path(Application::getWyfHome("models/datastores/databases/{$dbDriver}"));
Db::$defaultDatabase = $selected;
SQLDBDataStore::$activeDriverClass = $dbDriverClass;
Application::$config = $config;
Application::$prefix = $config['prefix'];
Cache::init($config['cache']['method']);
define('CACHE_MODELS', $config['cache']['models']);
define('CACHE_PREFIX', "");
define('ENABLE_AUDIT_TRAILS', $config['audit_trails']);
开发者ID:nthc,项目名称:cfx,代码行数:31,代码来源:wyf_bootstrap.php

示例5: __construct

 public function __construct($buttons = array())
 {
     Application::addStyleSheet("css/toolbar.css", Application::getWyfHome("toolbar/"));
     $this->buttons = $buttons;
 }
开发者ID:ekowabaka,项目名称:cfx,代码行数:5,代码来源:Toolbar.php

示例6: import

 /**
  * Provides all the necessary forms needed to start an update.
  * @param $params
  * @return string
  */
 public function import()
 {
     $this->label = "Import " . $this->label;
     $form = new Form();
     $form->add(Element::create("UploadField", "File", "file", "Select the file you want to upload."), Element::create("Checkbox", "Break on errors", "break_on_errors", "", "1")->setValue("1"));
     $form->addAttribute("style", "width:50%");
     $form->setCallback($this->getClassName() . '::importCallback', $this);
     $form->setSubmitValue('Import Data');
     return $this->arbitraryTemplate(Application::getWyfHome('model_controller/import.tpl'), array('form' => $form->render(), 'template' => "{$this->path}/export/csv?template=yes"));
 }
开发者ID:ekowabaka,项目名称:cfx,代码行数:15,代码来源:ModelController.php

示例7: getContents

 public function getContents()
 {
     $form = $this->getForm();
     $data = array("script" => $this->script, "filters" => $form->render());
     return $this->arbitraryTemplate(Application::getWyfHome("controllers/reports.tpl"), $data);
 }
开发者ID:nthc,项目名称:cfx,代码行数:6,代码来源:ReportController.php

示例8: render

 public function render($headers = true)
 {
     global $redirectedPackage;
     $results = $this->tableData;
     $this->fields = $results["fieldInfos"];
     foreach ($this->fields as $field) {
         if ($field["type"] == "number" || $field["type"] == "double" || $field["type"] == "integer") {
             $this->headerParams[$field["name"]]["type"] = "number";
         }
     }
     $this->headers = $results["headers"];
     array_shift($this->headers);
     if ($headers === true) {
         $table = $this->renderHeader();
     }
     if ($this->useAjax) {
         $table .= "<tr>\n                <td align='center' colspan='" . count($this->headers) . "'>\n                    <img style='margin:80px' src='/" . Application::getLink(Application::getWyfHome("tapi/images/loading-image-big.gif")) . "' />\n                </td></tr>";
     } else {
         $this->data = $results["data"];
         $table .= parent::render(false);
     }
     if ($headers === true) {
         $table .= $this->renderFooter();
     }
     if ($this->useAjax) {
         $this->params['redirected_package'] = $redirectedPackage;
         $table .= "<div id='{$this->name}-operations'></div>\n            <script type='text/javascript'>\n                wyf.tapi.addTable('{$this->name}',(" . json_encode($this->params) . "));\n                var externalConditions = [];\n                var externalBoundData = [];\n                function {$this->name}Search()\n                {\n                    var conditions = '';\n                    var boundData = [];\n                    {$this->searchScript}\n                    wyf.tapi.tables['{$this->name}'].filter = conditions;\n                    wyf.tapi.tables['{$this->name}'].bind = boundData;\n                    if(externalConditions['{$this->name}'])\n                    {\n                        wyf.tapi.tables['{$this->name}'].filter += ((conditions != '' ?' AND ':'') + externalConditions['{$this->name}']);\n                        wyf.tapi.tables['{$this->name}'].bind = boundData.concat(externalBoundData);\n                    }\n                    wyf.tapi.tables['{$this->name}'].page = 0;\n                    wyf.tapi.render(wyf.tapi.tables['{$this->name}']);\n                }\n            </script>";
     }
     return $table;
 }
开发者ID:ekowabaka,项目名称:cfx,代码行数:30,代码来源:MultiModelTable.php

示例9: add_include_path

<?php

add_include_path(Application::getWyfHome('modules/system/audit_trail'));
/**
 * A model represents an abstract data storing entity. Models are used to access
 * data.
 *  
 * @author james
 */
abstract class Model implements ArrayAccess
{
    const MODE_ASSOC = "assoc";
    const MODE_ARRAY = "array";
    const TRANSACTION_MODE_ADD = "add";
    const TRANSACTION_MODE_EDIT = "edit";
    /**
     * @todo rename this to hooks
     * @var unknown_type
     */
    //protected $services;
    public $name;
    public $prefix;
    public $package;
    public $database;
    public $label;
    public $description;
    public $showInMenu;
    public $queryResolve = true;
    public $queryExplicitRelations = false;
    public $queryMode = Model::MODE_ASSOC;
    public $storedFields;
开发者ID:ekowabaka,项目名称:wyf,代码行数:31,代码来源:Model.php

示例10: str_replace

                    $i++;
                }
                $item = str_replace("_", " ", $item);
                $item = ucwords($item);
                $top_menu .= "<a href='" . Application::getLink($link) . "'><span>{$item}</span></a>";
            }
            Application::$templateEngine->assign('top_menu', $top_menu);
        }
    }
}
// Log the route into the audit trail if it is enabled
if ($_SESSION['logged_in'] == true && $_GET['q'] != 'system/api/table' && ENABLE_AUDIT_TRAILS === true) {
    $data = json_encode(array('route' => $_GET['q'], 'request' => $_REQUEST, 'get' => $_GET, 'post' => $_POST));
    if (class_exists("SystemAuditTrailModel", false) && ENABLE_ROUTING_TRAILS === true) {
        SystemAuditTrailModel::log(array('item_id' => '0', 'item_type' => 'routing_activity', 'description' => "Accessed [{$_GET['q']}]", 'type' => SystemAuditTrailModel::AUDIT_TYPE_ROUTING, 'data' => $data));
    }
}
// Load the styleseets and the javascripts
if ($GLOBALS['fapi_stylesheet'] === false) {
    Application::preAddStylesheet("css/fapi.css", Application::getWyfHome("fapi/"));
} else {
    Application::preAddStylesheet($GLOBALS['fapi_stylesheet']);
}
Application::preAddStylesheet("kalendae/kalendae.css", Application::getWyfHome('assets/js/'));
Application::preAddStylesheet("css/main.css");
Application::addStylesheet('css/rapi.css', Application::getWyfHome('rapi/'));
Application::addJavaScript(Application::getLink(Application::getWyfHome("fapi/js/fapi.js")));
Application::addJavaScript(Application::getLink(Application::getWyfHome("assets/js/jquery.js")));
Application::addJavaScript(Application::getLink(Application::getWyfHome("assets/js/kalendae/kalendae.js")));
// Blast the HTML code to the browser!
Application::render();
开发者ID:ekowabaka,项目名称:wyf,代码行数:31,代码来源:entry.php

示例11: notes

 public function notes($params)
 {
     $noteAttachments = Model::load('system.note_attachments');
     if ($params[1] == 'delete') {
         $model = Model::load('system.notes');
         $model->delete('note_id', $params[2]);
         Application::redirect("{$this->path}/notes/{$params[0]}");
     }
     if (isset($_POST['is_form_sent'])) {
         $model = Model::load('system.notes');
         $model->datastore->beginTransaction();
         $data = array('note' => $_POST['note'], 'note_time' => time(), 'item_id' => $params[0], 'user_id' => $_SESSION['user_id'], 'item_type' => $this->model->package);
         $model->setData($data);
         $id = $model->save();
         for ($i = 1; $i < 5; $i++) {
             $file = $_FILES["attachment_{$i}"];
             if ($file['error'] == 0) {
                 $noteAttachments->setData(array('note_id' => $id, 'description' => $file['name'], 'object_id' => PgFileStore::addFile($file['tmp_name'])));
                 $noteAttachments->save();
             }
         }
         $model->datastore->endTransaction();
         Application::redirect("{$this->urlPath}/notes/{$params[0]}");
     }
     $notes = SQLDBDataStore::getMulti(array('fields' => array('system.notes.note_id', 'system.notes.note', 'system.notes.note_time', 'system.users.first_name', 'system.users.last_name'), 'conditions' => Model::condition(array('item_type' => $this->model->package, 'item_id' => $params[0]))));
     foreach ($notes as $i => $note) {
         $attachments = $noteAttachments->getWithField2('note_id', $note['note_id']);
         foreach ($attachments as $j => $attachment) {
             $attachments[$j]['path'] = PgFileStore::getFilePath($attachment['object_id'], $attachment['description']);
         }
         $notes[$i]['attachments'] = $attachments;
     }
     $this->label = "Notes on item";
     $form = Element::create('Form')->add(Element::create('TextArea', 'Note', 'note'), Element::create('FieldSet', 'Add Attachments')->add(Element::create('UploadField', 'Attachment', 'attachment_1'), Element::create('UploadField', 'Attachment', 'attachment_2'), Element::create('UploadField', 'Attachment', 'attachment_3'), Element::create('UploadField', 'Attachment', 'attachment_4'))->setId('attachments')->setCollapsible(true))->setRenderer('default');
     return $this->arbitraryTemplate(Application::getWyfHome('controllers/notes.tpl'), array('form' => $form->render(), 'notes' => $notes, 'route' => $this->path, 'id' => $params[0]));
 }
开发者ID:9naQuame,项目名称:wyf,代码行数:36,代码来源:ModelController.php

示例12: import

 /**
  * Provides all the necessary forms needed to start an update.
  * @param $params
  * @return string
  */
 public function import()
 {
     $this->label = "Import " . $this->label;
     $entity = $this->model->getEntity();
     $path = $this->urlPath;
     $form = new Form();
     $form->setRenderer('default');
     $form->add(Element::create("HTMLBox", "This import utility would assist you to import new {$entity} into your database. You are expected to upload a CSV file which contains the data you want to import." . " <p>Please click <a href='{$path}/export/csv?template=yes'>here</a> to download a template csv file.</p>"), Element::create("UploadField", "File", "file", "Select the file you want to upload."));
     $form->addAttribute("style", "width:50%");
     $form->setCallback($this->getClassName() . '::importCallback', $this);
     $form->setSubmitValue('Import Data');
     return $this->arbitraryTemplate(Application::getWyfHome('utils/model_controller/templates/import.tpl'), array('form' => $form->render()));
 }
开发者ID:ekowabaka,项目名称:wyf,代码行数:18,代码来源:ModelController.php


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