本文整理汇总了PHP中get_view函数的典型用法代码示例。如果您正苦于以下问题:PHP get_view函数的具体用法?PHP get_view怎么用?PHP get_view使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_view函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: exhibit_builder_page_tree
/**
* Return a nested-list tree navigation of exhibit pages.
*
* @param Exhibit|null Exhibit to print the tree of.
* @param ExhibitPage|null If given, indicates the "current" page which will
* be marked by a CSS class in the output
* @return string
*/
function exhibit_builder_page_tree($exhibit = null, $exhibitPage = null)
{
if (!$exhibit) {
$exhibit = get_current_record('exhibit');
}
return get_view()->exhibitPageTree($exhibit, $exhibitPage);
}
开发者ID:kyfr59,项目名称:cg35,代码行数:15,代码来源:ExhibitPageFunctions.php
示例2: render
/**
* Renders and displays the multiview.
*/
public function render($data = null, $subview = false)
{
if ($data != null) {
$this->data = $data;
} else {
$this->data = array();
}
$this->data['layout'] = $this;
$result = get_view($this->base_path . $this->view_name);
$this->parse_includes($result);
$this->parse_nestedcontrols_cdata($result);
$this->data['_extracted_content'] = $this->_extracted_content;
$result = render_fragment($result, $this->data);
$this->parse_layout($result, $subview);
$this->parse_subviews($result);
$this->parse_other_tags($result);
$this->parse_targets($result);
$this->parse_uses($result);
$this->parse_controls($result);
$this->parse_nestedcontrols($result);
if ($this->layout != null) {
$this->layout->add_content($this->target, $result);
$result = $this->layout->render($data);
}
return $result;
}
开发者ID:jawngee,项目名称:HeavyMetal,代码行数:29,代码来源:mapped_view.php
示例3: hookNeatlineEditorTemplates
/**
* Queue editor templates.
*
* @param array $args Array of arguments, with `exhibit`.
*/
public function hookNeatlineEditorTemplates($args)
{
if ($args['exhibit']->hasWidget(self::ID)) {
echo get_view()->partial('waypoints/editor/form.php');
echo get_view()->partial('waypoints/editor/list.php');
}
}
开发者ID:rameysar,项目名称:Omeka-Grinnell-RomanCiv,代码行数:12,代码来源:NeatlineWaypointsPlugin.php
示例4: queue_theme_assets
/**
* Adds theme assets to queues.
*
* - Modernizr
* - Respond.js
* - Selectivizr
* - Google Fonts style sheet
* - Theme style sheet
*/
function queue_theme_assets()
{
queue_js_file('modernizr.min');
queue_js_file(array('respond.min', 'selectivizr.min'), 'javascripts', array('conditional' => 'lt IE 9'));
get_view()->headLink()->prependStylesheet('http://fonts.googleapis.com/css?family=Crimson+Text:400,600,400italic,600italic|Cabin:400,600,400italic', 'screen');
queue_css_file('style');
}
开发者ID:sgbalogh,项目名称:peddler_clone5,代码行数:16,代码来源:functions.php
示例5: editFieldHTML
function editFieldHTML($textField, $view = false)
{
if (!$view) {
$view = get_view();
}
return $view->formInput($textField, null, array("type" => "text", "class" => "rangeSearchTextField", "size" => 4, "maxlength" => 10));
}
开发者ID:GerZah,项目名称:plugin-RangeSearch,代码行数:7,代码来源:RangeSearchUI.php
示例6: get_tags_list
function get_tags_list()
{
$tags = get_the_tags();
if (empty($tags)) {
return;
}
get_view('post-tags', '', compact('tags'));
}
开发者ID:benjamincrozat,项目名称:wp-theme-boilerplate,代码行数:8,代码来源:helpers.php
示例7: filterElementInput
/**
* Filter the element input.
*
* @param array $components
* @param array $args
* @return array
*/
public function filterElementInput($components, $args)
{
// Use the cached vocab terms instead of
$terms = explode("\n", $this->_simpleVocabTerms[$args['element']->id]);
$selectTerms = array('' => 'Select Below') + array_combine($terms, $terms);
$components['input'] = get_view()->formSelect($args['input_name_stem'] . '[text]', $args['value'], array('style' => 'width: 300px;'), $selectTerms);
$components['html_checkbox'] = false;
return $components;
}
开发者ID:rameysar,项目名称:Omeka-Grinnell-RomanCiv,代码行数:16,代码来源:SelectFilter.php
示例8: getTaggingForm
public function getTaggingForm($record = null)
{
if (get_view()->isTaggingAllowed()) {
require_once PLUGIN_DIR . '/Tagging/forms/TaggingForm.php';
$taggingSession = new Zend_Session_Namespace('tagging');
$form = new Tagging_TaggingForm($record);
if ($taggingSession->post) {
$form->isValid(unserialize($taggingSession->post));
}
unset($taggingSession->post);
return $form;
}
}
开发者ID:KelvinSmithLibrary,项目名称:playhouse,代码行数:13,代码来源:GetTaggingForm.php
示例9: infoAction
/**
* Send "info.json" for the current file.
*
* @internal The info is managed by the MediaControler because it indicates
* capabilities of the IXIF server for the request of a file.
*/
public function infoAction()
{
$id = $this->getParam('id');
if (empty($id)) {
throw new Omeka_Controller_Exception_404();
}
$record = get_record_by_id('File', $id);
if (empty($record)) {
throw new Omeka_Controller_Exception_404();
}
$info = get_view()->iiifInfo($record, false);
$this->_sendJson($info);
}
开发者ID:pabalexa,项目名称:UniversalViewer4Omeka,代码行数:19,代码来源:MediaController.php
示例10: perform
/**
* Performs the form.
*/
public function perform()
{
$params = $this->_options['params'];
// TODO Check acl (see ItemsBatchEditAll.php).
// TODO Add logs by item.
$view = get_view();
try {
$view->bulkEdit()->perform($params);
} catch (Exception $e) {
$message = __('An error occurred in background process.');
_log(__('Bulk Metadata Editor: %s', $message), Zend_Log::ERR);
return false;
}
}
开发者ID:biblibre,项目名称:omeka-plugin-BulkMetadataEditor,代码行数:17,代码来源:Process.php
示例11: contribution_contribute_url
/**
* Get a URL to the public contribution page.
*
* @param string $action Action to link to, main index if none.
* @return string URL
*/
function contribution_contribute_url($actionName = null)
{
$path = get_option('contribution_page_path');
if (empty($path)) {
$route = 'contributionDefault';
} else {
$route = 'contributionCustom';
}
$options = array();
if (!empty($actionName)) {
$options['action'] = $actionName;
}
return get_view()->url($options, $route, array(), true);
}
开发者ID:sgbalogh,项目名称:peddler_clone5,代码行数:20,代码来源:ThemeHelpers.php
示例12: alternativeManifestAction
public function alternativeManifestAction()
{
$id = $this->getParam('id');
if (empty($id)) {
throw new Omeka_Controller_Exception_404();
}
$recordType = $this->getParam('recordtype');
$record = get_record_by_id(Inflector::classify($recordType), $id);
if (empty($record)) {
throw new Omeka_Controller_Exception_404();
}
$manifest = get_view()->iiifManifest($record, false, true, $this->getParam('image'));
$this->_sendJson($manifest);
}
开发者ID:kyfr59,项目名称:cg35,代码行数:14,代码来源:PresentationController.php
示例13: hookConfigForm
/**
* Shows plugin configuration page.
*/
public function hookConfigForm($args)
{
$flash = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger');
// Full Csv Import.
if ($this->isFullCsvImport()) {
$flash->addMessage(__('You are using full Csv Import, so all import formats will be available.'), 'success');
} else {
$flash->addMessage(__('You are using standard Csv Import, so you will be able to import metadata of items only, not metadata of files.'), 'error');
}
// Require external processor.
if (!$this->isXsltSupported()) {
$flash->addMessage(__('No xslt processor is installed, neither the php internal one, nor an external one.') . ' ' . __('You must install one and set its path below.'), 'error');
}
$view = get_view();
echo $view->partial('plugins/xml-import-config-form.php');
}
开发者ID:cheegunn,项目名称:XmlImport,代码行数:19,代码来源:XmlImportPlugin.php
示例14: setUp
public function setUp()
{
parent::setUp();
$this->_view = get_view();
$this->_view->addHelperPath(CLEAN_URL_DIR . '/views/helpers', self::PLUGIN_NAME . '_View_Helper_');
$pluginHelper = new Omeka_Test_Helper_Plugin();
$pluginHelper->setUp(self::PLUGIN_NAME);
// Add constraints if derivatives have been added in the config file.
$fileDerivatives = Zend_Registry::get('bootstrap')->getResource('Config')->fileDerivatives;
if (!empty($fileDerivatives) && !empty($fileDerivatives->paths)) {
foreach ($fileDerivatives->paths->toArray() as $type => $path) {
set_option($type . '_constraint', 1);
}
}
$this->_prepareRecords();
$this->_reloadRoutes();
}
开发者ID:AdrienneSerra,项目名称:Digitalsc,代码行数:17,代码来源:CleanUrl_Test_AppTestCase.php
示例15: buildRSSHeaders
protected function buildRSSHeaders()
{
$headers = array();
// How do we determine what title to give the RSS feed?
$headers['title'] = option('site_title');
$headers['link'] = xml_escape(get_view()->serverUrl(isset($_SERVER['REQUEST_URI'])));
$headers['lastUpdate'] = time();
$headers['charset'] = "UTF-8";
// Feed could have a description, where would it be stored ?
// $headers['description'] = ""
$headers['author'] = option('site_title');
$headers['email'] = option('administrator_email');
$headers['copyright'] = option('copyright');
//How do we determine how long a feed can be cached?
//$headers['ttl'] =
return $headers;
}
开发者ID:lchen01,项目名称:STEdwards,代码行数:17,代码来源:ItemRss2.php
示例16: correctAction
public function correctAction()
{
$id = $this->getParam('id');
$correction = $this->_helper->db->getTable('CorrectionsCorrection')->find($id);
$item = $correction->getItem();
$item->setReplaceElementTexts(false);
$view = get_view();
$elTexts = $view->allElementTexts($correction, array('return_type' => 'array'));
//the array just gives the text, not the array that goes into setting element texts
$elTexts = $this->reformatElTexts($elTexts);
$item->addElementTextsByArray($elTexts);
$item->save();
$correction->status = 'accepted';
$correction->reviewed = date('Y-m-d H:i:s');
$correction->save();
$this->_helper->redirector->gotoUrl("items/show/{$correction->item_id}");
}
开发者ID:sgbalogh,项目名称:peddler_clone5,代码行数:17,代码来源:IndexController.php
示例17: exhibit_builder_render_exhibit_page
/**
* Render the markup for an exhibit page.
*
* @param ExhibitPage|null $exhibitPage
*/
function exhibit_builder_render_exhibit_page($exhibitPage = null)
{
if ($exhibitPage === null) {
$exhibitPage = get_current_record('exhibit_page');
}
$blocks = $exhibitPage->ExhibitPageBlocks;
$rawAttachments = $exhibitPage->getAllAttachments();
$attachments = array();
foreach ($rawAttachments as $attachment) {
$attachments[$attachment->block_id][] = $attachment;
}
foreach ($blocks as $index => $block) {
$layout = $block->getLayout();
echo '<div class="exhibit-block layout-' . html_escape($layout->id) . '">';
echo get_view()->partial($layout->getViewPartial(), array('index' => $index, 'options' => $block->getOptions(), 'text' => $block->text, 'attachments' => array_key_exists($block->id, $attachments) ? $attachments[$block->id] : array()));
echo '</div>';
}
}
开发者ID:rshiggin,项目名称:omeka-custom-exhibit,代码行数:23,代码来源:ExhibitPageFunctions.php
示例18: filterElementInput
public function filterElementInput($components, $args)
{
$view = get_view();
$element = $args['element'];
$element_id = $element->id;
$index = $args['index'];
$name = "Elements[{$element_id}][{$index}][text]";
$id = "Elements-{$element_id}-{$index}-text";
$first_id = "{$id}-first";
$middle_id = "{$id}-middle";
$last_id = "{$id}-last";
$value = $args['value'];
if ($value === '') {
$value = '{"first":"Insert","middle":"Name","last":"Here"}';
}
$m = json_decode($value, true);
$pieces = array($m['first'], $m['middle'], $m['last']);
$value = json_encode(array('first' => $m['first'], 'middle' => $m['middle'], 'last' => $m['last']));
$serial = implode(' ', $pieces);
$components['input'] = <<<EOT
<input type="hidden"
name="{$view->escape($name)}"
id="{$view->escape($id)}"
data-type="name"
data-first="{$view->escape($first_id)}"
data-middle="{$view->escape($middle_id)}"
data-last="{$view->escape($last_id)}"
value="{$view->escape($value)}"/>
<input type="text"
id="{$view->escape($first_id)}"
value="{$view->escape($m['first'])}"
data-parent="{$view->escape($id)}"/>
<input type="text"
id="{$view->escape($middle_id)}"
value="{$view->escape($m['middle'])}"
data-parent="{$view->escape($id)}"/>
<input type="text"
id="{$view->escape($last_id)}"
value="{$view->escape($m['last'])}"
data-parent="{$view->escape($id)}"/>
EOT;
$components['html_checkbox'] = NULL;
return $components;
}
开发者ID:uklibraries,项目名称:StructuredNames,代码行数:44,代码来源:StructuredNamesPlugin.php
示例19: record_url
/**
* Get a URL to a record.
*
* @package Omeka\Function\View\Navigation
* @uses Omeka_View_Helper_RecordUrl::recordUrl()
* @param Omeka_Record_AbstractRecord|string $record
* @param string|null $action
* @param bool $getAbsoluteUrl
* @param array $queryParams
* @return string
*/
function record_url($record, $action = null, $getAbsoluteUrl = false, $queryParams = array())
{
return get_view()->recordUrl($record, $action, $getAbsoluteUrl, $queryParams);
}
开发者ID:KelvinSmithLibrary,项目名称:playhouse,代码行数:15,代码来源:globals.php
示例20: number_format
$total_total_fees = '<b class="text-danger">$' . number_format($total_total_fees, 2) . '</b>';
if ($account_balance < 0) {
$account_balance = number_format($account_balance, 2);
$account_balance = str_replace('-', '-$', $account_balance);
$account_balance = '<b class="text-danger">' . $account_balance . '</b>';
} else {
$account_balance = '<b class="text-success">$' . number_format($account_balance, 2) . '</b>';
}
// ------------------------------------
if ($row['user_advisor1'] > 0) {
$query2 = 'SELECT * FROM users_advisors WHERE users_advisors_id=' . ($row['user_advisor1'] + 0) . ' LIMIT 1';
$res2 = $db->rq($query2);
$row2 = $db->fetch($res2);
} else {
$row2 = false;
}
if ($row['user_advisor2'] > 0 && $row['user_advisor1'] != $row['user_advisor2']) {
$query2 = 'SELECT * FROM users_advisors WHERE users_advisors_id=' . ($row['user_advisor2'] + 0) . ' LIMIT 1';
$res2 = $db->rq($query2);
$row3 = $db->fetch($res2);
} else {
$row3 = false;
}
$line_script = "<script type=\"text/javascript\">\n\tanalytics.identify('{$row['user_account_num']}', {\n\temail : '{$row['user_email']}',\n\tfirm : '{$row2['advisor_firm']}',\n\tname : '{$row['user_account_name']}'\n});\nanalytics.track('Signed In');\nanalytics.page('WP Login');\n</script>";
$active = 'index';
get_view('layouts/header', compact('username', 'PageTitle'));
get_view('layouts/sidebar', compact('active'));
get_view('index_view', compact('row3', 'row2', 'userTitles', 'row', 'total_trading2', 'total_funding2', 'total_total_fees', 'account_balance', 'total_purchase', 'total_sales', 'total_fees', 'total_trading', 'total_deposit', 'total_withdraw', 'total_fees2', 'total_funding'));
get_view('layouts/right_sidebar');
get_view('layouts/footer', compact('line_script'));
开发者ID:sahartak,项目名称:v1poject,代码行数:30,代码来源:index.php
注:本文中的get_view函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论