Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Fixed deprecated twig extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
roelvanhintum committed Oct 11, 2019
1 parent bc99f7a commit b7fe69c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.0.4 - 2019-10-11
### Fixed
- Deprecated twig extensions.

## 2.0.3 - 2019-03-20
### Changed
- Let the volume handle asset content retrieval.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "born05/craft-colorextractor",
"description": "Extract colors from image assets in Craft CMS. Requires a field named `imageColor` on all assets of kind image (can be color or plaintext)",
"type": "craft-plugin",
"version": "2.0.3",
"version": "2.0.4",
"keywords": [
"craft",
"cms",
Expand Down
8 changes: 5 additions & 3 deletions src/twigextensions/ColorExtractorTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
use born05\colorextractor\ColorExtractor;

use Craft;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;

class ColorExtractorTwigExtension extends \Twig_Extension
class ColorExtractorTwigExtension extends AbstractExtension
{
public function getName()
{
Expand All @@ -23,8 +25,8 @@ public function getName()
public function getFilters()
{
return [
new \Twig_SimpleFilter('colorExtractor', [$this, 'colorExtractorFilter']),
new \Twig_SimpleFilter('colorIsDark', [$this, 'colorIsDarkFilter']),
new TwigFilter('colorExtractor', [$this, 'colorExtractorFilter']),
new TwigFilter('colorIsDark', [$this, 'colorIsDarkFilter']),
];
}

Expand Down

0 comments on commit b7fe69c

Please sign in to comment.