YamlFormHandlerPluginCollection.php in YAML Form 8
File
src/YamlFormHandlerPluginCollection.php
View source
<?php
namespace Drupal\yamlform;
use Drupal\Core\Plugin\DefaultLazyPluginCollection;
class YamlFormHandlerPluginCollection extends DefaultLazyPluginCollection {
public function &get($instance_id) {
return parent::get($instance_id);
}
public function sortHelper($a_id, $b_id) {
$a_weight = $this
->get($a_id)
->getWeight();
$b_weight = $this
->get($b_id)
->getWeight();
if ($a_weight == $b_weight) {
return 0;
}
return $a_weight < $b_weight ? -1 : 1;
}
}