Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 0fe5cad3 authored by Nicolas's avatar Nicolas
Browse files

Suppression de la variable $activeContent

Modification du template
Modification du typage d'une fonction
parent e31277ae
No related branches found
No related tags found
No related merge requests found
Pipeline #480 failed
......@@ -170,10 +170,10 @@ class CategoryWidgetNew extends Template implements BlockInterface
/**
* Get Items
*
* @param $content
* @param string $content
* @return array
*/
public function getItems(string $content)
public function getItems(string $content) : array
{
$array = explode('|', $content);
$array = array_map('intval', $array);
......@@ -285,14 +285,6 @@ class CategoryWidgetNew extends Template implements BlockInterface
return $this->getData('title_element_tag');
}
/**
* Récupère la class CSS du titre du widget
*/
public function getWidgetTitleCSS()
{
return $this->getData('title_css_classes');
}
/**
* Récupère la valeur pour l'ajout d'un contenu en haut
*/
......
# Changelog
## [2.0.1] - 2020-05-10
### Deleted
- Suppression de la variable $activeContent
### Changed
- Modification du template
- Modification du typage d'une fonction
## [2.0.0] - 2020-05-09
### Changed
- Refonte du module
......
......@@ -2,7 +2,7 @@
"name": "nicolasbejean/categorywidget",
"description": "Afficher une liste de catégories",
"type": "magento2-module",
"version": "2.0.0",
"version": "2.0.1",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/framework": "102.0.*",
......
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="NicolasBejean_CategoryWidget" setup_version="2.0.0">
<module name="NicolasBejean_CategoryWidget" setup_version="2.0.1">
<sequence>
<module name="Magento_Backend"/>
<module name="Magento_Catalog"/>
......
......@@ -35,18 +35,14 @@ if ($active) {
<?php if ($activeWrapper): ?>
<div class="categorywidget <?php if ($block->getWrapperCssClasses()): ?><?= /* @noEscape */ $block->getWrapperCssClasses(); ?><?php endif; ?>">
<?php endif; ?>
<?php if ($activeTitle || $activeContent): ?>
<div class="categorywidget-title-content <?php if ($block->getWidgetTitleCSS()): ?><?= /* @noEscape */ $block->getWidgetTitleCSS(); ?><?php endif; ?>">
<?php if ($activeTitle): ?>
<<?= /* @noEscape */ $block->getWidgetTitleTag(); ?>><?= /* @noEscape */ $block->getWidgetTitle(); ?></<?= /* @noEscape */ $block->getWidgetTitleTag(); ?>>
<?php endif; ?>
<?php if ($activeTitleElement): ?>
<<?= /* @noEscape */ $block->getWidgetTitleElementTag(); ?>><?= /* @noEscape */ $widget->getTitle(); ?></<?= /* @noEscape */ $block->getWidgetTitleElementTag(); ?>>
<?php endif; ?>
<?php if ($activeContentTop): ?>
<p class="categorywidget-content-top <?php if ($block->getWidgetContentCSS()): ?><?= /* @noEscape */ $block->getWidgetContentCSS(); ?><?php endif; ?>"><?= /* @noEscape */ $block->getWidgetContentTop(); ?></p>
<?php endif; ?>
</div>
<?php if ($activeTitle): ?>
<<?= /* @noEscape */ $block->getWidgetTitleTag(); ?> class="categorywidget-title"><?= /* @noEscape */ $block->getWidgetTitle(); ?></<?= /* @noEscape */ $block->getWidgetTitleTag(); ?>>
<?php endif; ?>
<?php if ($activeTitleElement): ?>
<<?= /* @noEscape */ $block->getWidgetTitleElementTag(); ?> class="categorywidget-title-element"><?= /* @noEscape */ $widget->getTitle(); ?></<?= /* @noEscape */ $block->getWidgetTitleElementTag(); ?>>
<?php endif; ?>
<?php if ($activeContentTop): ?>
<p class="categorywidget-content-top <?php if ($block->getWidgetContentCSS()): ?><?= /* @noEscape */ $block->getWidgetContentCSS(); ?><?php endif; ?>"><?= /* @noEscape */ $block->getWidgetContentTop(); ?></p>
<?php endif; ?>
<?php if ($templateType === 'collection'): ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment