/srv
/users
/serverpilot
/apps
/rpretail
/public
/components
/com_bloom
/assets
/views
/mspecs
/zip
/ci
/slideshow.php
<?php
use Bloom\JoomlaComponent\Helpers\Statics\Breakpoints;
use Bloom\JoomlaComponent\Images\Manager;
use SI\API\Mspecs\Collections\ImagesInEstates;
use SI\Providers\Imgix\Image;
/** @var $bids \Bloom\JoomlaComponent\Helpers\Mspecs\Collections\Bids */
/** @var $deals \Bloom\JoomlaComponent\Helpers\Mspecs\Collections\Deals */
/** @var $estates \Bloom\JoomlaComponent\Helpers\Mspecs\Collections\Estates */
/** @var $deal \Bloom\JoomlaComponent\Helpers\Mspecs\Items\Deal */
/** @var $mspecs \SI\API\Mspecs\Collection */
/** @var $this \League\Plates\Template\Template */
$deal = $deals->first();
$estate = $estates->first();
/*
<?= $image->displayOrder ?>
<?= $image->title ?>
<?= $image->isDealMainImage() ?>
<?= $image->isEstateMainImage() ?>
*/
// Get all images except floorplans
$images = $estates->imagesInEstates()
->where('category', '!=', ImagesInEstates::CATEGORY_FLOOR_PLAN)
->files()
->where('isPublished', '=', true)
->get();
// slice out the first three images
$imageMax = min(count($images), 300);
$images = array_slice($images, 0, $imageMax);
// process each image left and add sizes and breakpoints
$responsiveImages = array_map(function ($image) {
return Manager::mspecsImage($image->raw('originalURI'))
->addSize(Breakpoints::tiny(), function (Image $image) {
/srv
/users
/serverpilot
/apps
/rpretail
/public
/components
/com_bloom
/vendor
/league
/plates
/src
/Template
/Template.php
* @throws \Exception
* @return string
*/
public function render(array $data = array())
{
$this->data($data);
unset($data);
extract($this->data);
if (!$this->exists()) {
throw new LogicException(
'The template "' . $this->name->getName() . '" could not be found at "' . $this->path() . '".'
);
}
try {
$level = ob_get_level();
ob_start();
include $this->path();
$content = ob_get_clean();
if (isset($this->layoutName)) {
$layout = $this->engine->make($this->layoutName);
$layout->sections = array_merge($this->sections, array('content' => $content));
$content = $layout->render($this->layoutData);
}
return $content;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
/srv
/users
/serverpilot
/apps
/rpretail
/public
/components
/com_bloom
/vendor
/league
/plates
/src
/Engine.php
/**
* Create a new template.
* @param string $name
* @return Template
*/
public function make($name)
{
return new Template($this, $name);
}
/**
* Create a new template and render it.
* @param string $name
* @param array $data
* @return string
*/
public function render($name, array $data = array())
{
return $this->make($name)->render($data);
}
}
/srv
/users
/serverpilot
/apps
/rpretail
/public
/components
/com_bloom
/src
/JoomlaComponent
/Component.php
/**
* Render a view.
*
* @param \ItemRenderer $itemRenderer
* @param string $view
* @param array $data
* @return string
*/
public static function render(\ItemRenderer $itemRenderer, string $view, $data = []): string
{
$instance = self::boot($itemRenderer, $data);
$instance->itemRenderer = $itemRenderer;
$instance->data = $data;
$instance->bootData()
->bootTemplateEngine();
return $instance->templateEngine->render($view);
}
/**
* Boot the initial container data.
*
* @return Component
*/
protected function bootData(): self
{
if ($this->itemRenderer->checkPosition('deals_data'))
{
$mspecsData = json_decode($this->itemRenderer->renderPosition('deals_data'), true);
$this->mspecs = new Collection($mspecsData);
}
return $this;
}
/**
* Boot the database connection.
/srv
/users
/serverpilot
/apps
/rpretail
/public
/modules
/mod_zooitempro
/renderer
/item
/ci_bild_mspecs.php
<?php
use Bloom\JoomlaComponent\Component;
use Bloom\JoomlaComponent\ZOO\ZooManager as ZooManager;
defined('_JEXEC') or die('Restricted access');
require_once __DIR__ . '/../../../../components/com_bloom/vendor/autoload.php';
$z = new ZooManager($this, $item, false);
$categories = $z->get('categories');
echo Component::render($this, 'mspecs/zip/ci/slideshow');
/srv
/users
/serverpilot
/apps
/rpretail
/public
/administrator
/components
/com_zoo
/helpers
/renderer.php
* @param array $args Arguments to be passed to into the layout scope.
*
* @return string The rendered output
* @since 2.0
*/
public function render($layout, $args = array()) {
// prevent render to recurse indefinitely
static $count = 0;
$count++;
if ($count < self::MAX_RENDER_RECURSIONS) {
// render layout
if ($__layout = $this->_getLayoutPath($layout)) {
// import vars and layout output
extract($args);
ob_start();
include($__layout);
$output = ob_get_contents();
ob_end_clean();
$count--;
return $output;
}
$count--;
// raise warning, if layout was not found
JError::raiseWarning(0, 'Renderer Layout "'.$layout.'" not found. ('.$this->app->utility->debugInfo(debug_backtrace(), 1).')');
return null;
}
// raise warning, if render recurses indefinitly
JError::raiseWarning(0, 'Warning! Render recursed indefinitly. ('.$this->app->utility->debugInfo(debug_backtrace()).')');
return null;
/srv
/users
/serverpilot
/apps
/rpretail
/public
/administrator
/components
/com_zoo
/classes
/renderer
/item.php
*
* @since 2.0
*/
public function render($layout, $args = array()) {
// set item
$this->_item = isset($args['item']) ? $args['item'] : null;
// init vars
$render = true;
$result = '';
// trigger beforedisplay event
if ($this->_item) {
$this->app->event->dispatcher->notify($this->app->event->create($this->_item, 'item:beforedisplay', array('render' => &$render, 'html' => &$result)));
}
// render layout
if ($render) {
$result .= parent::render($layout, $args);
// trigger afterdisplay event
if ($this->_item) {
$this->app->event->dispatcher->notify($this->app->event->create($this->_item, 'item:afterdisplay', array('html' => &$result)));
}
}
return $result;
}
/**
* Check if a position generates some output
*
* @param string $position The name of the position to check
*
* @return boolean If the position generates some kind of output
*
* @since 2.0
*/
/srv
/users
/serverpilot
/apps
/rpretail
/public
/modules
/mod_zooitempro
/tmpl
/current.php
defined('_JEXEC') or die();
// only if in zoo item view
if ($zoo->zlfw->enviroment->is('site.com_zoo.item')) {
$item = $zoo->zlfw->enviroment->params->get('item_id');
// set renderer
$renderer = $zoo->renderer->create('item')->addPath(array($zoo->path->path('component.site:'), $zoo->path->path('modules:mod_zooitempro')));
// get the renderer layout - it's ubication in the params has changed in v3.1, so check both
$renderer_layout = basename($params->find('layout.renderer_layout', 'default'), '.php');
}
?>
<?php if (!empty($item)) : ?>
<?php $item = $zoo->table->item->get($item); ?>
<?php echo $renderer->render('item.' . $renderer_layout, compact('item', 'params')); ?>
<?php endif; ?>
/srv
/users
/serverpilot
/apps
/rpretail
/public
/modules
/mod_zooitempro
/mod_zooitempro.php
/**
* @package ZOOitemPro
* @version 3.3.4
* @author ZOOlanders - http://zoolanders.com
* @license GNU General Public License v2 or later
*/
defined('_JEXEC') or die();
require_once(JPATH_ADMINISTRATOR.'/components/com_zoo/config.php');
require_once(dirname(__FILE__).'/helper.php');
$zoo = App::getInstance('zoo');
$path = dirname(__FILE__);
$params = $zoo->data->create($params->toArray());
$zoo->system->language->load('com_zoo');
$zoo->path->register($path, 'mod_zooitempro');
include(JModuleHelper::getLayoutPath('mod_zooitempro', basename($params->find('layout._layout', 'default'), '.php')));
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Helper
/ModuleHelper.php
if (file_exists($path))
{
$lang = \JFactory::getLanguage();
$coreLanguageDirectory = JPATH_BASE;
$extensionLanguageDirectory = dirname($path);
$langPaths = $lang->getPaths();
// Only load the module's language file if it hasn't been already
if (!$langPaths || (!isset($langPaths[$coreLanguageDirectory]) && !isset($langPaths[$extensionLanguageDirectory])))
{
// 1.5 or Core then 1.6 3PD
$lang->load($module->module, $coreLanguageDirectory, null, false, true) ||
$lang->load($module->module, $extensionLanguageDirectory, null, false, true);
}
$content = '';
ob_start();
include $path;
$module->content = ob_get_contents() . $content;
ob_end_clean();
}
// Load the module chrome functions
if (!$chrome)
{
$chrome = array();
}
include_once JPATH_THEMES . '/system/html/modules.php';
$chromePath = JPATH_THEMES . '/' . $template . '/html/modules.php';
if (!isset($chrome[$chromePath]))
{
if (file_exists($chromePath))
{
include_once $chromePath;
}
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Document
/Renderer
/Html
/ModuleRenderer.php
$module = clone $module;
$module->params = (string) $params;
}
// Default for compatibility purposes. Set cachemode parameter or use JModuleHelper::moduleCache from within the module instead
$cachemode = $params->get('cachemode', 'oldstatic');
if ($params->get('cache', 0) == 1 && \JFactory::getConfig()->get('caching') >= 1 && $cachemode != 'id' && $cachemode != 'safeuri')
{
// Default to itemid creating method and workarounds on
$cacheparams = new \stdClass;
$cacheparams->cachemode = $cachemode;
$cacheparams->class = 'JModuleHelper';
$cacheparams->method = 'renderModule';
$cacheparams->methodparams = array($module, $attribs);
return ModuleHelper::ModuleCache($module, $params, $cacheparams);
}
return ModuleHelper::renderModule($module, $attribs);
}
}
/srv
/users
/serverpilot
/apps
/rpretail
/public
/templates
/yootheme
/vendor
/yootheme
/theme-joomla-modules
/src
/ModulesRenderer.php
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\LayoutHelper;
use YOOtheme\Util\Collection;
class ModulesRenderer extends DocumentRenderer
{
public function render($position, $params = [], $content = null)
{
$app = Factory::getApplication();
$user = Factory::getUser();
$modules = ModuleHelper::getModules($position);
$renderer = $this->_doc->loadRenderer('module');
$frontEdit = $app->isSite() && $app->get('frontediting', 1) && !$user->guest;
$menusEdit = $app->get('frontediting', 1) == 2 && $user->authorise('core.edit', 'com_menus');
foreach ($modules as $module) {
$moduleHtml = $renderer->render($module, $params, $content);
if (!isset($module->attrs)) {
$module->attrs = [];
$module->config = new Collection();
}
if ($frontEdit && trim($moduleHtml) != '' && $user->authorise('module.edit.frontend', 'com_modules.module.'.$module->id)) {
$displayData = ['moduleHtml' => &$moduleHtml, 'module' => $module, 'position' => $position, 'menusediting' => $menusEdit];
LayoutHelper::render('joomla.edit.frontediting_modules', $displayData);
}
$module->content = $moduleHtml;
}
return HTMLHelper::_('render', 'position', array_merge(['items' => $modules], $params));
}
}
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Document
/HtmlDocument.php
return Cache::getWorkarounds($cbuffer[$hash], array('mergehead' => 1));
}
$options = array();
$options['nopathway'] = 1;
$options['nomodules'] = 1;
$options['modulemode'] = 1;
$this->setBuffer($renderer->render($name, $attribs, null), $type, $name);
$data = parent::$_buffer[$type][$name][$title];
$tmpdata = Cache::setWorkarounds($data, $options);
$cbuffer[$hash] = $tmpdata;
$cache->store($cbuffer, 'cbuffer_' . $type);
}
else
{
$this->setBuffer($renderer->render($name, $attribs, null), $type, $name, $title);
}
return parent::$_buffer[$type][$name][$title];
}
/**
* Set the contents a document includes
*
* @param string $content The content to be set in the buffer.
* @param array $options Array of optional elements.
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
public function setBuffer($content, $options = array())
{
// The following code is just for backward compatibility.
if (func_num_args() > 1 && !is_array($options))
{
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Document
/HtmlDocument.php
return $this;
}
/**
* Render pre-parsed template
*
* @return string rendered template
*
* @since 1.7.0
*/
protected function _renderTemplate()
{
$replace = array();
$with = array();
foreach ($this->_template_tags as $jdoc => $args)
{
$replace[] = $jdoc;
$with[] = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
}
return str_replace($replace, $with, $this->_template);
}
}
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Document
/HtmlDocument.php
/**
* Outputs the template to the browser.
*
* @param boolean $caching If true, cache the output
* @param array $params Associative array of attributes
*
* @return string The rendered data
*
* @since 1.7.0
*/
public function render($caching = false, $params = array())
{
$this->_caching = $caching;
if (empty($this->_template))
{
$this->parse($params);
}
$data = $this->_renderTemplate();
parent::render($caching, $params);
return $data;
}
/**
* Count the modules based on the given condition
*
* @param string $condition The condition to use
*
* @return integer Number of modules found
*
* @since 1.7.0
*/
public function countModules($condition)
{
$operators = '(\+|\-|\*|\/|==|\!=|\<\>|\<|\>|\<=|\>=|and|or|xor)';
$words = preg_split('# ' . $operators . ' #', $condition, -1, PREG_SPLIT_DELIM_CAPTURE);
if (count($words) === 1)
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Application
/CMSApplication.php
{
$this->docOptions['directory'] = defined('JPATH_THEMES') ? JPATH_THEMES : (defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
}
// Parse the document.
$this->document->parse($this->docOptions);
// Trigger the onBeforeRender event.
\JPluginHelper::importPlugin('system');
$this->triggerEvent('onBeforeRender');
$caching = false;
if ($this->isClient('site') && $this->get('caching') && $this->get('caching', 2) == 2 && !\JFactory::getUser()->get('id'))
{
$caching = true;
}
// Render the document.
$data = $this->document->render($caching, $this->docOptions);
// Set the application output data.
$this->setBody($data);
// Trigger the onAfterRender event.
$this->triggerEvent('onAfterRender');
// Mark afterRender in the profiler.
JDEBUG ? $this->profiler->mark('afterRender') : null;
}
/**
* Route the application.
*
* Routing is the process of examining the request environment to determine which
* component should receive the request. The component optional parameters
* are then set in the request object to be processed when the application is being
* dispatched.
*
* @return void
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Application
/SiteApplication.php
$this->setUserState('users.login.form.data', array('return' => \JUri::getInstance()->toString()));
$this->set('themeFile', 'offline.php');
$this->setHeader('Status', '503 Service Temporarily Unavailable', 'true');
}
if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline'))
{
$this->set('themeFile', 'component.php');
}
// Ensure themeFile is set by now
if ($this->get('themeFile') == '')
{
$this->set('themeFile', $file . '.php');
}
break;
}
parent::render();
}
/**
* Route the application.
*
* Routing is the process of examining the request environment to determine which
* component should receive the request. The component optional parameters
* are then set in the request object to be processed when the application is being
* dispatched.
*
* @return void
*
* @since 3.2
*/
protected function route()
{
// Execute the parent method
parent::route();
$Itemid = $this->input->getInt('Itemid', null);
/srv
/users
/serverpilot
/apps
/rpretail
/public
/libraries
/src
/Application
/CMSApplication.php
// Unset invalid system variables
foreach ($invalidInputVariables as $systemVariable)
{
$input->set($systemVariable, null);
}
// Abort when there are invalid variables
if ($invalidInputVariables)
{
throw new \RuntimeException('Invalid input, aborting application.');
}
// Perform application routines.
$this->doExecute();
// If we have an application document object, render it.
if ($this->document instanceof \JDocument)
{
// Render the application output.
$this->render();
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler')
{
$this->compress();
// Trigger the onAfterCompress event.
$this->triggerEvent('onAfterCompress');
}
// Send the application response.
$this->respond();
// Trigger the onAfterRespond event.
$this->triggerEvent('onAfterRespond');
}
/**
* Check if the user is required to reset their password.
/srv
/users
/serverpilot
/apps
/rpretail
/public
/index.php
{
include_once __DIR__ . '/defines.php';
}
if (!defined('_JDEFINES'))
{
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
}
require_once JPATH_BASE . '/includes/framework.php';
// Set profiler start time and memory usage and mark afterLoad in the profiler.
JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad') : null;
// Instantiate the application.
$app = JFactory::getApplication('site');
// Execute the application.
$app->execute();