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


PHP Backend::addContent方法代码示例

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


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

示例1: html_tweet

 public function html_tweet($result)
 {
     if ($result) {
         Backend::addSuccess('Tweeted!');
         Backend::addContent(var_export($result, true));
     }
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:7,代码来源:Twitter.obj.php

示例2: html_list

 public function html_list($document)
 {
     Backend::add('Sub Title', $document->getMeta('name'));
     Backend::add('TabLinks', $this->getTabLinks(Controller::$action));
     Backend::add('Object', $document);
     Backend::addContent(Render::renderFile('document_list.tpl.php'));
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:7,代码来源:Document.obj.php

示例3: html_display

 public function html_display($content)
 {
     Backend::add('Sub Title', 'Revisions for ' . $content->array['name']);
     Backend::add('content', $content);
     Backend::add('revisions', $content->object->revisions);
     Backend::addContent(Render::renderFile('content_revision.display.tpl.php'));
     return true;
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:8,代码来源:ContentRevision.obj.php

示例4: html_list

 public function html_list($result)
 {
     Backend::add('Sub Title', $result->getMeta('name'));
     Backend::add('TabLinks', $this->getTabLinks(Controller::$action));
     Backend::addScript(SITE_LINK . '/js/jquery.js');
     Backend::addScript(SITE_LINK . '/js/image_list.js');
     Backend::addStyle(SITE_LINK . '/css/image_list.css');
     Backend::addContent(Render::renderFile('image.list.tpl.php', array('db_object' => $result)));
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:9,代码来源:Image.obj.php

示例5: html_display

 public function html_display($result)
 {
     $result = parent::html_display($result);
     if (Value::get(get_class($this) . '_commented', true) && Component::isActive('Comment')) {
         if ($result instanceof DBObject) {
             $comments = Comment::getComments($result->getMeta('table'), $result->getMeta('id'));
             Backend::addContent(Render::renderFile('comments.tpl.php', array('comment_list' => $comments)));
             if (Permission::check('create', 'comment')) {
                 $values = array('foreign_table' => $result->getMeta('table'), 'foreign_id' => $result->getMeta('id'));
                 Backend::addContent(Render::renderFile('comment.add.tpl.php', $values));
             }
         }
     }
     return $result;
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:15,代码来源:CommentedController.obj.php

示例6: get_list

 function get_list($start, $count, array $options = array())
 {
     $Assignments = new AssignmentObj();
     if ($start === 'all') {
         $limit = 'all';
     } else {
         $limit = "{$start}, {$count}";
     }
     $conditions = array('`assignments`.`active` = 1');
     $joins = array(array('type' => 'LEFT', 'table' => '`roles`', 'conditions' => array('`roles`.`id` = `assignments`.`role_id`', '`roles`.`active` = 1')));
     $fields = array('`assignments`.*', '`roles`.`name` AS `role`');
     list($query, $params) = $Assignments->getSelectSQL(array('conditions' => $conditions, 'joins' => $joins, 'fields' => $fields, 'limit' => $limit));
     $Assignments->read(array('query' => $query, 'parameters' => $params));
     Backend::add('Assignments', $Assignments);
     Backend::addContent(Render::renderFile('assignment_list.tpl.php'));
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:16,代码来源:Assignment.obj.php

示例7: action_test

 public function action_test()
 {
     $requestingDevice = self::getDevice();
     if ($requestingDevice) {
         $content = '<ul>';
         $content .= '<li>ID: ' . $requestingDevice->id . '</li>';
         $content .= '<li>Brand Name: ' . $requestingDevice->getCapability("brand_name") . '</li>';
         $content .= '<li>Model Name: ' . $requestingDevice->getCapability("model_name") . '</li>';
         $content .= '<li>Xhtml Preferred Markup: ' . $requestingDevice->getCapability("preferred_markup") . '</li>';
         $content .= '<li>Resolution Width: ' . $requestingDevice->getCapability("resolution_width") . '</li>';
         $content .= '<li>Resolution Height: ' . $requestingDevice->getCapability("resolution_height") . '</li>';
         $content .= '</ul>';
     } else {
         $content = '<p>Could not get device information</p>';
     }
     Backend::addContent($content);
     return false;
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:18,代码来源:Wurfl.obj.php

示例8: hook_output

 public static function hook_output($to_print)
 {
     Backend::add('BackendErrors', Backend::getError());
     Backend::add('BackendSuccess', Backend::getSuccess());
     Backend::add('BackendNotices', Backend::getNotice());
     Backend::add('BackendInfo', Backend::getInfo());
     Backend::setError();
     Backend::setSuccess();
     Backend::setNotice();
     Backend::setInfo();
     $content = Backend::getContent();
     if (empty($content)) {
         ob_start();
         var_dump($to_print);
         $content = ob_get_clean();
         if (substr($content, 0, 4) != '<pre') {
             $content = '<pre>' . $content . '</pre>';
         }
         Backend::addContent($content);
     }
     $to_print = Render::renderFile('styles.area.tpl.php');
     $to_print .= Render::renderFile('maincontent.tpl.php');
     $to_print .= Render::renderFile('scripts.tpl.php');
     $to_print = HtmlView::addLastContent($to_print);
     $to_print = HtmlView::replace($to_print);
     $to_print = HtmlView::rewriteLinks($to_print);
     $to_print = HtmlView::addLinks($to_print);
     $to_print = HtmlView::formsAcceptCharset($to_print);
     if (Component::isActive('BackendFilter')) {
         $BEFilter = new BEFilterObj();
         $BEFilter->read();
         $filters = $BEFilter->list ? $BEFilter->list : array();
         foreach ($filters as $row) {
             if (class_exists($row['class'], true) && is_callable(array($row['class'], $row['function']))) {
                 $to_print = call_user_func(array($row['class'], $row['function']), $to_print);
             }
         }
     }
     return $to_print;
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:40,代码来源:ChunkView.obj.php

示例9: html_filter

 public function html_filter($resultArray)
 {
     //backend_error.filter.tpl.php
     Backend::addContent(Render::renderFile('backend_request.filter.tpl.php', array('data' => $resultArray['data'], 'params' => $resultArray['params'], 'pager' => $resultArray['pager'], 'sort' => $resultArray['sort'])));
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:5,代码来源:BackendRequest.obj.php

示例10: html_home

 public function html_home($methods)
 {
     Backend::addContent(Render::file('std_home.tpl.php', array('methods' => $methods)));
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:4,代码来源:AreaCtl.obj.php

示例11: whoops

 public function whoops($title, $message, $code_hint = false)
 {
     Backend::add('Sub Title', $title);
     Backend::addContent('<ht>' . $message . '<hr>');
     parent::whoops($title, $message, $code_hint);
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:6,代码来源:HtmlView.obj.php

示例12: html_define

 public function html_define($values)
 {
     if ($values) {
         if ($values['function']) {
             Backend::add('Sub Title', $values['class'] . '::' . $values['function']);
             Backend::addContent(Render::renderFile('api_function.tpl.php', $values));
         } else {
             Backend::add('Sub Title', $values['class']);
             Backend::addContent(Render::renderFile('api_class.tpl.php', $values));
         }
     }
     return true;
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:13,代码来源:API.obj.php

示例13: show

 public static function show($id)
 {
     $content = Content::retrieve($id);
     if ($content) {
         $content = array_key_exists('markdown', $content) ? markdown($content['markdown']) : $content['body'];
         Backend::addContent($content);
     }
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:8,代码来源:Content.obj.php

示例14: html_import

 public function html_import($result)
 {
     switch (true) {
         case $result instanceof DBObject:
             if (!Backend::get('Sub Title')) {
                 Backend::add('Sub Title', 'Import');
                 Backend::add('Sub Title', 'Import ' . $result->getMeta('name'));
             }
             $template_file = array($result->getArea() . '.import.tpl.php', $result->getArea() . '/import.tpl.php');
             if (!Render::checkTemplateFile($template_file[0]) && !Render::checkTemplateFile($template_file[1])) {
                 $template_file = 'std_import.tpl.php';
             }
             Backend::addContent(Render::file($template_file, array('db_object' => $result)));
             break;
         case is_numeric($result) && $result >= 0:
             Backend::addSuccess($result . ' records imported');
             Controller::redirect('?q=' . Controller::$area . '/list');
             break;
         default:
             Controller::redirect();
             break;
     }
     return $result;
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:24,代码来源:TableCtl.obj.php

示例15: html_manage

 function html_manage($result)
 {
     Backend::add('Sub Title', 'Manage Components');
     Backend::add('result', $result);
     Links::add('Admin', '?q=admin/index', 'secondary');
     Backend::addScript(SITE_LINK . 'js/jquery.js');
     Backend::addScript(SITE_LINK . 'js/component.manage.js');
     Backend::addContent(Render::file('component.manage.tpl.php'));
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:9,代码来源:Component.obj.php


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