viewhelper

Fluid Typo3 - How to get variables definded via flux from different page uids

爷,独闯天下 提交于 2021-01-27 13:42:36
问题 I guess my problem is easily solved, but I'm thinking for days about it, googling didn't help me out. Maybe I just don't understand the concept :-). In my provider extension I define a simple main page with one configuration option. Depending on what "fontawesomeicon" says for a page, its corresponding Fonteawesome-Icon shall be placed before the menu entry text. But when I implement it this way, every page menu entry gets the Icon from the actual page. I don't know how to tell the system,

ZF2 widgets/views in layout

大憨熊 提交于 2020-01-17 14:01:35
问题 I am working on a website where I need a "widget" like view in my layout of Zend Framework 2. the widget should show the operational status of the server (this is done). (Correct me if this is bad MVC style) I have build a controller with the function viewStatusAction(){ ... return $viewModel(array($vars)) } then i want to use a viewHelper to get the status of the action. This is where I'm stuck. I know how to create the viewHelper, but not where to start to get the returned view from the

ZF2 widgets/views in layout

我与影子孤独终老i 提交于 2020-01-17 14:00:06
问题 I am working on a website where I need a "widget" like view in my layout of Zend Framework 2. the widget should show the operational status of the server (this is done). (Correct me if this is bad MVC style) I have build a controller with the function viewStatusAction(){ ... return $viewModel(array($vars)) } then i want to use a viewHelper to get the status of the action. This is where I'm stuck. I know how to create the viewHelper, but not where to start to get the returned view from the

Extending Zend\View\Helper\Url in Zend Framework 2

不打扰是莪最后的温柔 提交于 2019-12-22 10:57:36
问题 I wrote a simple url view helper, that extends Zend\View\Helper\Url and attached it to the ViewHelperManager : MyNamespace\View\Helper\Url namespace MyNamespace\View\Helper; use Zend\View\Helper\Url as ZendUrl; class Url extends ZendUrl { public function __invoke($name = null, array $params = array(), $options = array(), $reuseMatchedParams = false) { $link = parent::__invoke($name, $params, $options, $reuseMatchedParams); ... return $link; } } Application\Module namespace Application; use ..

FluidTYPO3 vhs ViewHelper for SVG Images?

﹥>﹥吖頭↗ 提交于 2019-12-12 00:55:01
问题 I use TYPO3 CMS 6.2.14, vhs 2.3.3 , Flux 7.2.1 and FluidContent 4.3.1 - my TYPO3 Editor need the opportunity to upload SVG-Images via vhs -ViewHelper. I've made a new FluidTYPO3 Content Element (FCE), but there's no SVG Image visible in frontend. Mmhh? Flux-FlexForm <flux:field.file name="imgIcon" allowed="jpg,gif,png,jpeg,svg" uploadFolder="uploads/tx_myext" minItems="0" maxItems="1" size="1" /> ... <v:media.image src="uploads/tx_myext/{imgIcon}" alt="Icon" /> Output <div class="small-2

ViewHelper newable/injectable dilemma

南楼画角 提交于 2019-12-10 17:28:37
问题 I'm trying to design an application following Misko Heverys insights. It's an interesting experiment and a challenge. Currently I'm struggling with my ViewHelper implementation. The ViewHelper decouples the model from the view. In my implementation it wraps the model and provides the API for the view to use. I'm using PHP, but I hope the implementation is readable for everyone: class PostViewHelper { private $postModel; public function __construct(PostModel $postModel) { $this->postModel =

Extending Zend\\View\\Helper\\Url in Zend Framework 2

人盡茶涼 提交于 2019-12-06 03:10:34
I wrote a simple url view helper, that extends Zend\View\Helper\Url and attached it to the ViewHelperManager : MyNamespace\View\Helper\Url namespace MyNamespace\View\Helper; use Zend\View\Helper\Url as ZendUrl; class Url extends ZendUrl { public function __invoke($name = null, array $params = array(), $options = array(), $reuseMatchedParams = false) { $link = parent::__invoke($name, $params, $options, $reuseMatchedParams); ... return $link; } } Application\Module namespace Application; use ... class Module { public function onBootstrap(MvcEvent $mvcEvent) { $application = $mvcEvent-

How to use a custom form view helper in Zend Framework 2?

两盒软妹~` 提交于 2019-12-01 08:25:32
I wrote a form view helper, that extends the Zend\Form\View\Helper\FormMultiCheckbox and overwrites its renderOptions(...) method: <?php namespace MyNamespace\Form\View\Helper; use Zend\Form\View\Helper\FormMultiCheckbox as ZendFormMultiCheckbox; class FormMultiCheckbox extends ZendFormMultiCheckbox { protected function renderOptions(...) { ... $label = $escapeHtmlHelper($label); $labelOpen = $labelHelper->openTag($labelAttributes); switch ($labelPosition) { case self::LABEL_PREPEND: $template = $labelOpen . $label . $labelClose . '%s'; break; case self::LABEL_APPEND: default: $template = '%s'

How to use a custom form view helper in Zend Framework 2?

此生再无相见时 提交于 2019-12-01 04:47:10
问题 I wrote a form view helper, that extends the Zend\Form\View\Helper\FormMultiCheckbox and overwrites its renderOptions(...) method: <?php namespace MyNamespace\Form\View\Helper; use Zend\Form\View\Helper\FormMultiCheckbox as ZendFormMultiCheckbox; class FormMultiCheckbox extends ZendFormMultiCheckbox { protected function renderOptions(...) { ... $label = $escapeHtmlHelper($label); $labelOpen = $labelHelper->openTag($labelAttributes); switch ($labelPosition) { case self::LABEL_PREPEND: