Jarves\Configuration\Bundle::getAdminAssets PHP Method

getAdminAssets() public method

public getAdminAssets ( string $filter = '', boolean $regex = false ) : Asset[] | Assets[]
$filter string
$regex boolean
return Asset[] | Assets[]
    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;
        }
    }