mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 11:56:32 +02:00
refactors + support for onAdminCompilePresetSCSS() event
This commit is contained in:
31
classes/plugin/ScssList.php
Normal file
31
classes/plugin/ScssList.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace Grav\Plugin\Admin;
|
||||
|
||||
class ScssList {
|
||||
protected $list= [];
|
||||
|
||||
public function __construct($item = null)
|
||||
{
|
||||
if ($item) {
|
||||
$this->add($item);
|
||||
}
|
||||
}
|
||||
|
||||
public function all()
|
||||
{
|
||||
return $this->list;
|
||||
}
|
||||
|
||||
public function add($item)
|
||||
{
|
||||
$this->list[] = $item;
|
||||
}
|
||||
|
||||
public function remove($item)
|
||||
{
|
||||
if (in_array($item)) {
|
||||
unset($item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user