[TASK] Remove ClickMenuOnIconViewHelper of filelist extension 35/55735/4
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 15 Feb 2018 13:01:12 +0000 (14:01 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 Feb 2018 16:29:59 +0000 (17:29 +0100)
Move the templating code into the template instead of using a
ViewHelper.

Resolves: #83919
Releases: master
Change-Id: I3df5fc096cbb7d53406f46abca1ab83fdaabc709
Reviewed-on: https://review.typo3.org/55735
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/filelist/Classes/ViewHelpers/Link/ClickMenuOnIconViewHelper.php [deleted file]
typo3/sysext/filelist/Resources/Private/Templates/FileList/Search.html

diff --git a/typo3/sysext/filelist/Classes/ViewHelpers/Link/ClickMenuOnIconViewHelper.php b/typo3/sysext/filelist/Classes/ViewHelpers/Link/ClickMenuOnIconViewHelper.php
deleted file mode 100644 (file)
index bc75c8e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace TYPO3\CMS\Filelist\ViewHelpers\Link;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
-
-/**
- * Class ClickMenuOnIconViewHelper
- */
-class ClickMenuOnIconViewHelper extends AbstractTagBasedViewHelper
-{
-    /**
-     * @var string
-     */
-    protected $tagName = 'a';
-
-    /**
-     * Defines additional arguments that are allowed for this view helper.
-     */
-    public function initializeArguments()
-    {
-        parent::initializeArguments();
-        $this->registerUniversalTagAttributes();
-        $this->registerArgument('table', 'string', '', true);
-    }
-
-    /**
-     * Renders click menu link (context sensitive menu)
-     *
-     * @return string
-     * @see \TYPO3\CMS\Backend\Utility\BackendUtility::wrapClickMenuOnIcon()
-     */
-    public function render()
-    {
-        $this->tag->addAttribute('class', 't3js-contextmenutrigger ' . $this->arguments['class']);
-        $this->tag->addAttribute('data-uid', $this->arguments['table']);
-        $this->tag->addAttribute('data-table', 'sys_file');
-        $this->tag->addAttribute('href', '#');
-
-        $this->tag->setContent($this->renderChildren());
-
-        return $this->tag->render();
-    }
-}
index 9608e56..69954f7 100644 (file)
@@ -31,9 +31,9 @@
                                <f:for each="{files}" as="file">
                                        <tr data-uid="0" data-l10nparent="0">
                                                <td class="col-icon nowrap">
-                                                       <fl:link.clickMenuOnIcon table="{file.identifier}">
+                                                       <a class="t3js-contextmenutrigger" data-uid="{file.identifier}" data-table="sys_file" href="#">
                                                                {file.icon->f:format.raw()}
-                                                       </fl:link.clickMenuOnIcon>
+                                                       </a>
                                                </td>
                                                <td class="col-path nowrap">
                                                        {file.path}