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


PHP ipView函数代码示例

本文整理汇总了PHP中ipView函数的典型用法代码示例。如果您正苦于以下问题:PHP ipView函数的具体用法?PHP ipView怎么用?PHP ipView使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: menu_80

 /**
  * @desc Generate menu with custom ul ID and class
  * @author Allan Laal <allan@permanent.ee>
  * @param array $params
  * @return string
  */
 public static function menu_80($params)
 {
     $data = array('items' => null, 'depth' => 1, 'active' => 'active', 'crumb' => 'crumb', 'disabled' => 'disabled', 'parent' => 'parent', 'children' => 'children', 'view' => 'Ip/Internal/Config/view/menu.php');
     if (is_string($params)) {
         $params = array('items' => $params);
     }
     if (!empty($params[0]) && is_object($params[0]) && $params[0] instanceof \Ip\Menu\Item) {
         $params = array('items' => $params);
     }
     $data = array_merge($data, $params);
     // pass params to View along with other data
     if (isset($params['items']) && is_string($params['items'])) {
         $data['items'] = \Ip\Menu\Helper::getMenuItems($params['items']);
     }
     if (empty($data['attributes']) || !is_array($data['attributes'])) {
         $data['attributes'] = array();
     }
     //generate attributes str
     if (empty($data['attributes']['class'])) {
         $data['attributes']['class'] = '';
     }
     $data['attributes']['class'] = 'level' . $data['depth'] . ' ' . $data['attributes']['class'];
     $data['attributesStr'] = join(' ', array_map(function ($sKey) use($data) {
         if (is_bool($data['attributes'][$sKey])) {
             return $data['attributes'][$sKey] ? $sKey : '';
         }
         return $sKey . '="' . $data['attributes'][$sKey] . '"';
     }, array_keys($data['attributes'])));
     $view = ipView($data['view'], $data);
     return $view->render();
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:37,代码来源:Slot.php

示例2: index

 public function index()
 {
     $model = Model::instance();
     ipAddJs('Ip/Internal/Grid/assets/grid.js');
     ipAddJs('Ip/Internal/Grid/assets/gridInit.js');
     ipAddJs('Ip/Internal/Grid/assets/subgridField.js');
     $notes = array();
     if (isset($_SESSION['Ip']['notes']) && is_array($_SESSION['Ip']['notes'])) {
         $notes = $_SESSION['Ip']['notes'];
     }
     unset($_SESSION['Ip']['notes']);
     $enableUpdate = !defined('MULTISITE_WEBSITES_DIR');
     // Disable update in MultiSite installation.
     $trash = array('size' => \Ip\Internal\Pages\Service::trashSize());
     $data = array('notes' => $notes, 'version' => \Ip\ServiceLocator::storage()->get('Ip', 'version'), 'changedUrl' => $model->getOldUrl() != $model->getNewUrl(), 'oldUrl' => $model->getOldUrl(), 'newUrl' => $model->getNewUrl(), 'migrationsAvailable' => \Ip\Internal\Update\Service::migrationsAvailable(), 'migrationsUrl' => ipActionUrl(array('pa' => 'Update')), 'recoveryPageForm' => \Ip\Internal\System\Helper::recoveryPageForm(), 'emptyPageForm' => \Ip\Internal\System\Helper::emptyPageForm(), 'trash' => $trash);
     $content = ipView('view/index.php', $data)->render();
     if ($enableUpdate) {
         ipAddJs('Ip/Internal/System/assets/update.js');
     }
     if ($trash['size'] > 0) {
         ipAddJs('Ip/Internal/Core/assets/js/angular.js');
         ipAddJs('Ip/Internal/System/assets/trash.js');
     }
     ipAddJs('Ip/Internal/System/assets/migrations.js');
     ipAddJs('assets/cache.js');
     return $content;
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:27,代码来源:AdminController.php

示例3: ipHead

 public static function ipHead($head)
 {
     $vars = array('siteName' => ipGetOptionLang('Config.websiteTitle'));
     $defaultTitle = ipGetOptionLang('FacebookTags.defaultTitle');
     if ($defaultTitle) {
         $vars['title'] = $defaultTitle;
     }
     $defaultImage = array(ipGetOptionLang('FacebookTags.defaultImage'));
     if ($defaultImage) {
         $vars['images'] = $defaultImage;
     }
     $adminId = ipGetOptionLang('FacebookTags.adminId');
     if ($adminId) {
         $vars['adminId'] = $adminId;
     }
     $pageTags = Service::facebookTags();
     if (!empty($pageTags['images'])) {
         foreach ($pageTags['images'] as &$image) {
             $image = ipFileUrl('file/repository/' . $image);
         }
     } else {
         unset($pageTags['images']);
     }
     $vars = array_merge($vars, $pageTags);
     $tags = ipView('view/tags.php', $vars)->render();
     $head .= $tags;
     return $head;
 }
开发者ID:impresspages-plugins,项目名称:FacebookTags,代码行数:28,代码来源:Filter.php

示例4: ipBlockContent

 public static function ipBlockContent($content, $data)
 {
     if ($data['blockName'] == "main") {
         $pagePassword = Service::pagePassword();
         $pageId = Model::getPageId();
         if ($pagePassword && !ipAdminId()) {
             if (isset($_SESSION['pagePassword']) && is_array($_SESSION['pagePassword']) && in_array($pageId, $_SESSION['pagePassword'])) {
                 return $content;
             }
             $data['form'] = Helper::createForm();
             $postPassword = ipRequest()->getPost('pagePassword');
             if ($postPassword && $postPassword == $pagePassword) {
                 if (isset($_SESSION['pagePassword']) && is_array($_SESSION['pagePassword'])) {
                     $_SESSION['pagePassword'][] = $pageId;
                 } else {
                     $_SESSION['pagePassword'] = array();
                     $_SESSION['pagePassword'][] = $pageId;
                 }
                 return $content;
             } elseif ($postPassword) {
                 $data['error'] = __('Incorrect password', 'PagePassword', false);
             }
             return ipView('view/password.php', $data)->render();
         }
     }
     return $content;
 }
开发者ID:sspaeti,项目名称:ImpressPages,代码行数:27,代码来源:Filter.php

示例5: getImageContainerHtml

 public function getImageContainerHtml()
 {
     $html = ipView('view/imageContainer.php', array())->render();
     $result = array("status" => "success", "html" => $html);
     // TODO JsonRpc
     return new \Ip\Response\Json($result);
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:7,代码来源:AdminController.php

示例6: render

 /**
  * Render field
  *
  * @param string $doctype
  * @param $environment
  * @return string
  */
 public function render($doctype, $environment)
 {
     $data = array('attributesStr' => $this->getAttributesStr($doctype), 'classes' => implode(' ', $this->getClasses()), 'inputName' => $this->getName(), 'fileLimit' => $this->fileLimit, 'value' => $this->getValue(), 'preview' => $this->preview, 'secure' => $this->secure, 'path' => $this->path, 'filter' => $this->filter, 'filterExtensions' => $this->filterExtensions);
     $viewFile = 'adminView/repositoryFile.php';
     $view = ipView($viewFile, $data);
     return $view->render();
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:14,代码来源:RepositoryFile.php

示例7: renderLayout

 public static function renderLayout($view, $data = array())
 {
     $content = ipView($view, $data)->render();
     $response = new LayoutResponse();
     $response->setContent($content);
     return $response;
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:7,代码来源:Helper.php

示例8: execute

 /**
  * Execute response and return html response
  *
  * @return \Ip\Response
  */
 public function execute()
 {
     ipContent()->setBlockContent('main', $this->content);
     $layout = $this->getLayout();
     if ($layout[0] == '/' || $layout[1] == ':') {
         // Check if absolute path: '/' for unix, 'C:' for windows
         $viewFile = $layout;
         if (!is_file($viewFile)) {
             $viewFile = ipThemeFile('main.php');
         }
     } elseif (strpos($layout, '/') !== false) {
         //impresspages path. Eg. Ip/Internal/xxx.php
         $viewFile = $layout;
         if (!is_file(ipFile($viewFile))) {
             $viewFile = ipThemeFile('main.php');
         }
     } else {
         //layout file. Like main.php
         $viewFile = ipThemeFile($layout);
         if (!is_file($viewFile)) {
             $viewFile = ipThemeFile('main.php');
         }
     }
     $content = ipView($viewFile, $this->getLayoutVariables())->render();
     $response = new \Ip\Response($content, $this->getHeaders(), $this->getStatusCode());
     return $response;
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:32,代码来源:Layout.php

示例9: ipBeforeController

 public static function ipBeforeController()
 {
     $request = \Ip\ServiceLocator::request();
     $sessionLifetime = ini_get('session.gc_maxlifetime');
     if (!$sessionLifetime) {
         $sessionLifetime = 120;
     }
     if ($sessionLifetime > 30) {
         $sessionLifetime = $sessionLifetime - 20;
     }
     ipAddJsVariable('ipSessionRefresh', $sessionLifetime);
     if (ipConfig()->isDebugMode()) {
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.js', null, 10);
         // default, global jQuery
         ipAddJs('Ip/Internal/Core/assets/ipCore/console.log.js', null, 10);
         ipAddJs('Ip/Internal/Core/assets/ipCore/functions.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.tools.form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/color.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/file.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/richtext.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/repositoryFile.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/url.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/validator.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/widgets.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/ipCore.js');
     } else {
         ipAddJs('Ip/Internal/Core/assets/ipCore.min.js', null, 10);
     }
     //Form init
     $validatorTranslations = array('Ip-admin' => static::validatorLocalizationData('Ip-admin'), ipContent()->getCurrentLanguage()->getCode() => static::validatorLocalizationData('Ip'));
     ipAddJsVariable('ipValidatorTranslations', $validatorTranslations);
     if (ipAdminId() || \Ip\Internal\Admin\Model::isLoginPage() || \Ip\Internal\Admin\Model::isPasswordResetPage()) {
         if (ipConfig()->isDebugMode()) {
             ipAddJs('Ip/Internal/Core/assets/admin/managementMode.js');
             ipAddJs('Ip/Internal/Core/assets/admin/functions.js');
             ipAddJs('Ip/Internal/Core/assets/admin/validator.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap/bootstrap.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap-switch/bootstrap-switch.js');
         } else {
             ipAddJs('Ip/Internal/Core/assets/admin.min.js', null, 10);
         }
         ipAddJs('Ip/Internal/Core/assets/tinymce/pastePreprocess.js');
         ipAddJs('Ip/Internal/Core/assets/tinymce/default.js');
     }
     if (ipAdminId()) {
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/jquery.tinymce.min.js');
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/tinymce.min.js');
         ipAddJsVariable('ipBrowseLinkModalTemplate', ipView('view/browseLinkModal.php')->render());
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.full.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.browserplus.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.gears.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/jquery.plupload.queue/jquery.plupload.queue.js');
         if (is_file(ipThemeFile('setup/admin.js'))) {
             ipAddJs(ipThemeUrl('setup/admin.js'));
         }
         ipAddCss('Ip/Internal/Core/assets/admin/admin.css');
     }
 }
开发者ID:Umz,项目名称:ImpressPages,代码行数:59,代码来源:Event.php

示例10: veryEmail_10

 public static function veryEmail_10($vcode)
 {
     $fcode = substr($vcode, 0, strpos($vcode, '-!'));
     $mail = substr($vcode, strpos($vcode, '-!') + 2, 250);
     ipDb()->update('comments', array('approved' => '1'), array('verification_code' => $fcode, 'email' => $mail));
     $data = array('message' => __('Your email address has been verified. Thank you.', 'Comments'));
     return ipView('view/mailVerified.php', $data)->render();
 }
开发者ID:sspaeti,项目名称:ImpressPages,代码行数:8,代码来源:Slot.php

示例11: testSessions

 public function testSessions()
 {
     if (!empty($_SESSION['websiteId'])) {
         return new \Ip\Response\Json(array('status' => 'success'));
     }
     $answer = array('html' => ipView('view/sessionsDontWork.php')->render());
     return new \Ip\Response\Json($answer);
 }
开发者ID:impresspages,项目名称:impresspages,代码行数:8,代码来源:PublicController.php

示例12: AddThis

 public static function AddThis($widget = false)
 {
     if ($widget) {
         $layout = ipGetOption('AddThis.widgetLayout');
     } else {
         $layout = ipGetOption('AddThis.slotLayout');
     }
     return ipView('view/' . $layout . '.php')->render();
 }
开发者ID:sspaeti,项目名称:ImpressPages,代码行数:9,代码来源:Slot.php

示例13: index

 /**
  * @ipSubmenu Table types
  */
 public function index()
 {
     ipAddJs('Ip/Internal/Core/assets/js/angular.js');
     ipAddJs('Plugin/DataTableWidget/assets/tableTypesController.js');
     $data = array('createForm' => AdminFormHelper::createForm(true), 'updateForm' => AdminFormHelper::updateForm(true), 'deleteForm' => AdminFormHelper::deleteForm());
     ipAddJsVariable('tableTypes', TableType::getAllAsArray());
     ipAddJsVariable('columnOptions', TableType::getColumnOptions());
     ipAddJsVariable('languages', ipContent()->getLanguages());
     return ipView('view/layout.php', $data)->render();
 }
开发者ID:hmuralt,项目名称:DataTableWidget,代码行数:13,代码来源:AdminController.php

示例14: ipWidgetHtml

 public static function ipWidgetHtml($html, $data)
 {
     $classes = array();
     if (!in_array($data['name'], array('AsdBlogList', 'Columns', 'Divider', 'ipWidget-AsdBlogList')) && self::getThemeOption('wowAnimation', 'none') != 'none') {
         $classes[] = 'wow';
         $classes[] = self::getThemeOption('wowAnimation', 'none');
         return ipView('view/widgetWrapper.php', compact('classes', 'html'));
     }
     return $html;
 }
开发者ID:sspaeti,项目名称:ImpressPages,代码行数:10,代码来源:Filter.php

示例15: adminHtmlSnippet

 public function adminHtmlSnippet()
 {
     $form = new \Ip\Form();
     $form->setEnvironment(\Ip\Form::ENVIRONMENT_ADMIN);
     $form->addField(new \Ip\Form\Field\Text(array('name' => 'title', 'label' => __('Title', 'Portfolio'), 'value' => null)));
     $form->addField(new \Ip\Form\Field\RichText(array('name' => 'description', 'label' => __('Description', 'Portfolio'), 'value' => null)));
     $form->addField(new \Ip\Form\Field\RepositoryFile(array('name' => 'imagelink', 'label' => __('Image', 'Portfolio'), 'fileLimit' => 1, 'value' => empty($item['imagelink']) ? null : array($item['imagelink']))));
     $form->addField(new \Ip\Form\Field\Url(array('name' => 'pagelink', 'label' => __('Page Url', 'Portfolio'), 'value' => null)));
     return ipView('snippet/edit.php', array('form' => $form))->render();
 }
开发者ID:sspaeti,项目名称:ImpressPages,代码行数:10,代码来源:Controller.php


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