本文整理汇总了PHP中get_view函数的典型用法代码示例。如果您正苦于以下问题:PHP get_view函数的具体用法?PHP get_view怎么用?PHP get_view使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_view函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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;
}
示例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');
}
}
示例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');
}
示例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));
}
示例6: get_tags_list
function get_tags_list()
{
$tags = get_the_tags();
if (empty($tags)) {
return;
}
get_view('post-tags', '', compact('tags'));
}
示例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;
}
示例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;
}
}
示例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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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');
}
示例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();
}
示例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;
}