public function getAdminAssets($filter = '', $regex = false)
{
if (!$filter) {
return $this->adminAssets;
} else {
$result = array();
if ($regex) {
$filter = addcslashes($filter, '/');
} else {
$filter = preg_quote($filter, '/');
}
if (null !== $this->adminAssets) {
foreach ($this->adminAssets as $asset) {
if (preg_match('/' . $filter . '/', $asset->getPath())) {
$result[] = $asset;
}
}
}
return $result;
}
}