/home
/lareferencia
/vufind
/themes
/neutral
/templates
/RecordDriver
/SolrDefault
/result-list.phtml
<?
$data = $this->driver->getRawData();
?>
<br>
<input type="hidden" value="<?= $this->escapeHtmlAttr($this->driver->getUniqueID()) ?>" class="hiddenId" />
<input type="hidden" value="<?= $this->escapeHtmlAttr($this->driver->getSourceIdentifier()) ?>" class="hiddenSource" />
<div class="media">
<div class="media-body">
<div class="result-body">
<div class="result-formats clearfix">
<?= $this->record($this->driver)->getFormatList() ?>
<? if (!$openUrlActive && empty($urls) && $this->driver->supportsAjaxStatus()): ?>
<span class="status ajax-availability hidden">
<span class="label label-default"><?= $this->transEsc('Loading') ?>...</span>
</span>
<? endif; ?>
</div>
</div>
<div class="result-title">
<a href="<?= $this->recordLink()->getUrl($this->driver) ?>" class="title getFull" data-view="<?= $this->params->getOptions()->getListViewOption() ?>">
<?= $this->record($this->driver)->getTitleHtml() ?>
</a>
</div>
<div class="row">
<div class="col-sm-6 text-left">
<?
$summAuthors = $this->driver->getRawData()['author_facet'];
if (!empty($summAuthors)):
?>
<?= $this->transEsc('by') ?>
<?
$authorCount = count($summAuthors);
foreach ($summAuthors as $i => $summAuthor):
?>
<a href="<?= $this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false)) ?>"><?= $this->highlight($summAuthor) ?></a><?= $i + 1 < $authorCount ? '; ' : '' ?>
/home
/lareferencia
/vufind
/themes
/neutral
/templates
/RecordDriver
/SolrDefault
/result-list.phtml
<?
$data = $this->driver->getRawData();
?>
<br>
<input type="hidden" value="<?= $this->escapeHtmlAttr($this->driver->getUniqueID()) ?>" class="hiddenId" />
<input type="hidden" value="<?= $this->escapeHtmlAttr($this->driver->getSourceIdentifier()) ?>" class="hiddenSource" />
<div class="media">
<div class="media-body">
<div class="result-body">
<div class="result-formats clearfix">
<?= $this->record($this->driver)->getFormatList() ?>
<? if (!$openUrlActive && empty($urls) && $this->driver->supportsAjaxStatus()): ?>
<span class="status ajax-availability hidden">
<span class="label label-default"><?= $this->transEsc('Loading') ?>...</span>
</span>
<? endif; ?>
</div>
</div>
<div class="result-title">
<a href="<?= $this->recordLink()->getUrl($this->driver) ?>" class="title getFull" data-view="<?= $this->params->getOptions()->getListViewOption() ?>">
<?= $this->record($this->driver)->getTitleHtml() ?>
</a>
</div>
<div class="row">
<div class="col-sm-6 text-left">
<?
$summAuthors = $this->driver->getRawData()['author_facet'];
if (!empty($summAuthors)):
?>
<?= $this->transEsc('by') ?>
<?
$authorCount = count($summAuthors);
foreach ($summAuthors as $i => $summAuthor):
?>
<a href="<?= $this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false)) ?>"><?= $this->highlight($summAuthor) ?></a><?= $i + 1 < $authorCount ? '; ' : '' ?>
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-view
/src
/Renderer
/PhpRenderer.php
// assigns to a double-underscored variable, to prevent naming collisions
$__vars = $this->vars()->getArrayCopy();
if (array_key_exists('this', $__vars)) {
unset($__vars['this']);
}
extract($__vars);
unset($__vars); // remove $__vars from local scope
while ($this->__template = array_pop($this->__templates)) {
$this->__file = $this->resolver($this->__template);
if (! $this->__file) {
throw new Exception\RuntimeException(sprintf(
'%s: Unable to render template "%s"; resolver could not resolve to a file',
__METHOD__,
$this->__template
));
}
try {
ob_start();
$includeReturn = include $this->__file;
$this->__content = ob_get_clean();
} catch (\Exception $ex) {
ob_end_clean();
throw $ex;
}
if ($includeReturn === false && empty($this->__content)) {
throw new Exception\UnexpectedValueException(sprintf(
'%s: Unable to render template "%s"; file include failed',
__METHOD__,
$this->__file
));
}
}
$this->setVars(array_pop($this->__varsCache));
if ($this->__filterChain instanceof FilterChain) {
return $this->__filterChain->filter($this->__content); // filter output
}
/home
/lareferencia
/vufind
/module
/VuFind
/src
/VuFind
/View
/Helper
/Root
/Record.php
// Set default context if none provided:
if (is_null($context)) {
$context = ['driver' => $this->driver];
}
// Set up the needed context in the view:
$oldContext = $this->contextHelper->apply($context);
// Get the current record driver's class name, then start a loop
// in case we need to use a parent class' name to find the appropriate
// template.
$className = get_class($this->driver);
$resolver = $this->view->resolver();
while (true) {
// Guess the template name for the current class:
$classParts = explode('\\', $className);
$template = 'RecordDriver/' . array_pop($classParts) . '/' . $name;
if ($resolver->resolve($template)) {
// Try to render the template....
$html = $this->view->render($template);
$this->contextHelper->restore($oldContext);
return $html;
} else {
// If the template doesn't exist, let's see if we can inherit a
// template from a parent class:
$className = get_parent_class($className);
if (empty($className)) {
// No more parent classes left to try? Throw an exception!
throw new RuntimeException(
'Cannot find ' . $name . ' template for record driver: ' .
get_class($this->driver)
);
}
}
}
}
/**
* Store a record driver object and return this object so that the appropriate
* template can be rendered.
/home
/lareferencia
/vufind
/module
/VuFind
/src
/VuFind
/View
/Helper
/Root
/Record.php
/**
* Render a toolbar for use on the record view.
*
* @return string
*/
public function getToolbar()
{
return $this->renderTemplate('toolbar.phtml');
}
/**
* Render a search result for the specified view mode.
*
* @param string $view View mode to use.
*
* @return string
*/
public function getSearchResult($view)
{
return $this->renderTemplate('result-' . $view . '.phtml');
}
/**
* Render an HTML checkbox control for the current record.
*
* @param string $idPrefix Prefix for checkbox HTML ids
* @param string $formAttr ID of form for [form] attribute
*
* @return string
*/
public function getCheckbox($idPrefix = '', $formAttr = false)
{
static $checkboxCount = 0;
$id = $this->driver->getSourceIdentifier() . '|'
. $this->driver->getUniqueId();
$context
= ['id' => $id, 'count' => $checkboxCount++, 'prefix' => $idPrefix];
if ($formAttr) {
$context['formAttr'] = $formAttr;
}
/home
/lareferencia
/vufind
/themes
/bootstrap3
/templates
/search
/list-list.phtml
<? if (!isset($this->indexStart)) $this->indexStart = 0; ?>
<? $i = $this->indexStart; ?>
<? foreach ($this->results->getResults() as $current): ?>
<? $recordNumber = $this->results->getStartRecord() + $i-$this->indexStart; ?>
<div id="result<?=$i++ ?>" class="result<?=$current->supportsAjaxStatus()?' ajaxItem':''?>">
<? if (isset($this->showCheckboxes) && $this->showCheckboxes): ?>
<?=$this->record($current)->getCheckbox('', 'search-cart-form')?>
<? endif; ?>
<div class="record-number">
<?=$recordNumber ?>
</div>
<?=$this->record($current)->getSearchResult('list')?>
</div>
<? endforeach; ?>
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-view
/src
/Renderer
/PhpRenderer.php
// assigns to a double-underscored variable, to prevent naming collisions
$__vars = $this->vars()->getArrayCopy();
if (array_key_exists('this', $__vars)) {
unset($__vars['this']);
}
extract($__vars);
unset($__vars); // remove $__vars from local scope
while ($this->__template = array_pop($this->__templates)) {
$this->__file = $this->resolver($this->__template);
if (! $this->__file) {
throw new Exception\RuntimeException(sprintf(
'%s: Unable to render template "%s"; resolver could not resolve to a file',
__METHOD__,
$this->__template
));
}
try {
ob_start();
$includeReturn = include $this->__file;
$this->__content = ob_get_clean();
} catch (\Exception $ex) {
ob_end_clean();
throw $ex;
}
if ($includeReturn === false && empty($this->__content)) {
throw new Exception\UnexpectedValueException(sprintf(
'%s: Unable to render template "%s"; file include failed',
__METHOD__,
$this->__file
));
}
}
$this->setVars(array_pop($this->__varsCache));
if ($this->__filterChain instanceof FilterChain) {
return $this->__filterChain->filter($this->__content); // filter output
}
/home
/lareferencia
/vufind
/themes
/bootstrap3
/templates
/search
/results.phtml
<? $this->layout()->srmessage = $this->translate('nohit_lookfor_html', ['%%lookfor%%' => $this->escapeHtml($lookfor)]); ?>
<?=$this->layout()->srmessage ?>
<? endif; ?>
</p>
<? if (isset($this->parseError)): ?>
<p class="alert alert-danger"><?=$this->transEsc('nohit_parse_error')?></p>
<? endif; ?>
<? foreach (($top = $this->results->getRecommendations('top')) as $current): ?>
<?=$this->recommend($current)?>
<? endforeach; ?>
<? foreach ($this->results->getRecommendations('noresults') as $current): ?>
<? if (!in_array($current, $top)): ?>
<?=$this->recommend($current)?>
<? endif; ?>
<? endforeach; ?>
<? else: ?>
<form id="search-cart-form" method="post" name="bulkActionForm" action="<?=$this->url('cart-searchresultsbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler">
<?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => ''])?>
</form>
<?=$this->render('search/list-' . $this->params->getView() . '.phtml')?>
<?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => 'bottom_', 'formAttr' => 'search-cart-form'])?>
<?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $this->results, 'options' => isset($this->paginationOptions) ? $this->paginationOptions : []])?>
<div class="searchtools hidden-print">
<strong><?=$this->transEsc('Search Tools')?>:</strong>
<a href="<?=$this->results->getUrlQuery()->setViewParam('rss')?>"><i class="fa fa-bell" aria-hidden="true"></i> <?=$this->transEsc('Get RSS Feed')?></a>
—
<a href="<?=$this->url('search-email')?>" class="mailSearch" data-lightbox id="mailSearch<?=$this->escapeHtmlAttr($this->results->getSearchId())?>">
<i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this Search')?>
</a>
<? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?>
—
<? if (is_numeric($this->results->getSearchId())): ?>
<? if ($this->results->isSavedSearch()): ?>
<a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-remove" aria-hidden="true"></i> <?=$this->transEsc('save_search_remove')?></a>
<? else: ?>
<a href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('save_search')?></a>
<? endif; ?>
<? endif; ?>
<? endif; ?>
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-view
/src
/Renderer
/PhpRenderer.php
// assigns to a double-underscored variable, to prevent naming collisions
$__vars = $this->vars()->getArrayCopy();
if (array_key_exists('this', $__vars)) {
unset($__vars['this']);
}
extract($__vars);
unset($__vars); // remove $__vars from local scope
while ($this->__template = array_pop($this->__templates)) {
$this->__file = $this->resolver($this->__template);
if (! $this->__file) {
throw new Exception\RuntimeException(sprintf(
'%s: Unable to render template "%s"; resolver could not resolve to a file',
__METHOD__,
$this->__template
));
}
try {
ob_start();
$includeReturn = include $this->__file;
$this->__content = ob_get_clean();
} catch (\Exception $ex) {
ob_end_clean();
throw $ex;
}
if ($includeReturn === false && empty($this->__content)) {
throw new Exception\UnexpectedValueException(sprintf(
'%s: Unable to render template "%s"; file include failed',
__METHOD__,
$this->__file
));
}
}
$this->setVars(array_pop($this->__varsCache));
if ($this->__filterChain instanceof FilterChain) {
return $this->__filterChain->filter($this->__content); // filter output
}
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-view
/src
/View.php
// If EVENT_RENDERER or EVENT_RENDERER_POST changed the model, make sure
// we use this new model instead of the current $model
$model = $event->getModel();
// If we have children, render them first, but only if:
// a) the renderer does not implement TreeRendererInterface, or
// b) it does, but canRenderTrees() returns false
if ($model->hasChildren()
&& (! $renderer instanceof TreeRendererInterface
|| ! $renderer->canRenderTrees())
) {
$this->renderChildren($model);
}
// Reset the model, in case it has changed, and set the renderer
$event->setModel($model);
$event->setRenderer($renderer);
$rendered = $renderer->render($model);
// If this is a child model, return the rendered content; do not
// invoke the response strategy.
$options = $model->getOptions();
if (array_key_exists('has_parent', $options) && $options['has_parent']) {
return $rendered;
}
$event->setResult($rendered);
$event->setName(ViewEvent::EVENT_RESPONSE);
$events->triggerEvent($event);
}
/**
* Loop through children, rendering each
*
* @param Model $model
* @throws Exception\DomainException
* @return void
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-view
/src
/View.php
$event->setName(ViewEvent::EVENT_RESPONSE);
$events->triggerEvent($event);
}
/**
* Loop through children, rendering each
*
* @param Model $model
* @throws Exception\DomainException
* @return void
*/
protected function renderChildren(Model $model)
{
foreach ($model as $child) {
if ($child->terminate()) {
throw new Exception\DomainException('Inconsistent state; child view model is marked as terminal');
}
$child->setOption('has_parent', true);
$result = $this->render($child);
$child->setOption('has_parent', null);
$capture = $child->captureTo();
if (! empty($capture)) {
if ($child->isAppend()) {
$oldResult = $model->{$capture};
$model->setVariable($capture, $oldResult . $result);
} else {
$model->setVariable($capture, $result);
}
}
}
}
/**
* Create and return ViewEvent used by render()
*
* @return ViewEvent
*/
protected function getEvent()
{
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-view
/src
/View.php
__METHOD__
));
}
$event->setRenderer($renderer);
$event->setName(ViewEvent::EVENT_RENDERER_POST);
$events->triggerEvent($event);
// If EVENT_RENDERER or EVENT_RENDERER_POST changed the model, make sure
// we use this new model instead of the current $model
$model = $event->getModel();
// If we have children, render them first, but only if:
// a) the renderer does not implement TreeRendererInterface, or
// b) it does, but canRenderTrees() returns false
if ($model->hasChildren()
&& (! $renderer instanceof TreeRendererInterface
|| ! $renderer->canRenderTrees())
) {
$this->renderChildren($model);
}
// Reset the model, in case it has changed, and set the renderer
$event->setModel($model);
$event->setRenderer($renderer);
$rendered = $renderer->render($model);
// If this is a child model, return the rendered content; do not
// invoke the response strategy.
$options = $model->getOptions();
if (array_key_exists('has_parent', $options) && $options['has_parent']) {
return $rendered;
}
$event->setResult($rendered);
$event->setName(ViewEvent::EVENT_RESPONSE);
$events->triggerEvent($event);
}
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-mvc
/src
/View
/Http
/DefaultRenderingStrategy.php
if ($result instanceof Response) {
return $result;
}
// Martial arguments
$request = $e->getRequest();
$response = $e->getResponse();
$viewModel = $e->getViewModel();
if (!$viewModel instanceof ViewModel) {
return;
}
$view = $this->view;
$view->setRequest($request);
$view->setResponse($response);
$caughtException = null;
try {
$view->render($viewModel);
} catch (\Throwable $ex) {
$caughtException = $ex;
} catch (\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced
$caughtException = $ex;
}
if ($caughtException !== null) {
if ($e->getName() === MvcEvent::EVENT_RENDER_ERROR) {
throw $caughtException;
}
$application = $e->getApplication();
$events = $application->getEventManager();
$e->setError(Application::ERROR_EXCEPTION);
$e->setParam('exception', $caughtException);
$e->setName(MvcEvent::EVENT_RENDER_ERROR);
$events->triggerEvent($e);
}
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-eventmanager
/src
/EventManager.php
}
if ($this->sharedManager) {
foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) {
$listOfListenersByPriority[$priority][] = $listeners;
}
}
// Sort by priority in reverse order
krsort($listOfListenersByPriority);
// Initial value of stop propagation flag should be false
$event->stopPropagation(false);
// Execute listeners
$responses = new ResponseCollection();
foreach ($listOfListenersByPriority as $listOfListeners) {
foreach ($listOfListeners as $listeners) {
foreach ($listeners as $listener) {
$response = $listener($event);
$responses->push($response);
// If the event was asked to stop propagating, do so
if ($event->propagationIsStopped()) {
$responses->setStopped(true);
return $responses;
}
// If the result causes our validation callback to return true,
// stop propagation
if ($callback && $callback($response)) {
$responses->setStopped(true);
return $responses;
}
}
}
}
return $responses;
}
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-eventmanager
/src
/EventManager.php
$event = clone $this->eventPrototype;
$event->setName($eventName);
if ($target !== null) {
$event->setTarget($target);
}
if ($argv) {
$event->setParams($argv);
}
return $this->triggerListeners($event, $callback);
}
/**
* @inheritDoc
*/
public function triggerEvent(EventInterface $event)
{
return $this->triggerListeners($event);
}
/**
* @inheritDoc
*/
public function triggerEventUntil(callable $callback, EventInterface $event)
{
return $this->triggerListeners($event, $callback);
}
/**
* @inheritDoc
*/
public function attach($eventName, callable $listener, $priority = 1)
{
if (! is_string($eventName)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects a string for the event; received %s',
__METHOD__,
(is_object($eventName) ? get_class($eventName) : gettype($eventName))
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-mvc
/src
/Application.php
{
}
/**
* Complete the request
*
* Triggers "render" and "finish" events, and returns response from
* event object.
*
* @param MvcEvent $event
* @return Application
*/
protected function completeRequest(MvcEvent $event)
{
$events = $this->events;
$event->setTarget($this);
$event->setName(MvcEvent::EVENT_RENDER);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
$event->setName(MvcEvent::EVENT_FINISH);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
return $this;
}
}
/home
/lareferencia
/vufind
/vendor
/zendframework
/zend-mvc
/src
/Application.php
// Trigger dispatch event
$event->setName(MvcEvent::EVENT_DISPATCH);
$event->stopPropagation(false); // Clear before triggering
$result = $events->triggerEventUntil($shortCircuit, $event);
// Complete response
$response = $result->last();
if ($response instanceof ResponseInterface) {
$event->setName(MvcEvent::EVENT_FINISH);
$event->setTarget($this);
$event->setResponse($response);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
$this->response = $response;
return $this;
}
$response = $this->response;
$event->setResponse($response);
$this->completeRequest($event);
return $this;
}
/**
* @deprecated
*/
public function send()
{
}
/**
* Complete the request
*
* Triggers "render" and "finish" events, and returns response from
* event object.
*
* @param MvcEvent $event
* @return Application
*/
/home
/lareferencia
/vufind
/public
/index.php
if (file_exists('vendor/autoload.php')) {
$loader = include 'vendor/autoload.php';
}
// Support for ZF2_PATH environment variable
if ($zf2Path = getenv('ZF2_PATH')) {
if (isset($loader)) {
$loader->add('Zend', $zf2Path . '/Zend');
} else {
include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
AutoloaderFactory::factory();
}
}
if (!class_exists('Zend\Loader\AutoloaderFactory')) {
throw new RuntimeException('Unable to load ZF2.');
}
// Run the application!
Zend\Mvc\Application::init(require 'config/application.config.php')->run();
// Handle final profiling details, if necessary:
if ($xhprof) {
$xhprofData = extension_loaded('xhprof') ? xhprof_disable() : tideways_disable();
$xhprofRunId = uniqid();
$suffix = 'vufind';
$dir = ini_get('xhprof.output_dir');
if (empty($dir)) {
$dir = sys_get_temp_dir();
}
file_put_contents("$dir/$xhprofRunId.$suffix.xhprof", serialize($xhprofData));
$url = "$xhprof?run=$xhprofRunId&source=$suffix";
echo "<a href='$url'>Profiler output</a>";
}