Mercurial > hg > isophonics-drupal-site
view core/modules/image/src/ImageEffectPluginCollection.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
line wrap: on
line source
<?php namespace Drupal\image; use Drupal\Core\Plugin\DefaultLazyPluginCollection; /** * A collection of image effects. */ class ImageEffectPluginCollection extends DefaultLazyPluginCollection { /** * {@inheritdoc} * * @return \Drupal\image\ImageEffectInterface */ public function &get($instance_id) { return parent::get($instance_id); } /** * {@inheritdoc} */ public function sortHelper($aID, $bID) { $a_weight = $this->get($aID)->getWeight(); $b_weight = $this->get($bID)->getWeight(); if ($a_weight == $b_weight) { return 0; } return ($a_weight < $b_weight) ? -1 : 1; } }