Habari\Media::highlights PHP Method

highlights() public static method

Return an array of highlighted (featured) assets from all silos
public static highlights ( mixed $path = null ) : array
$path mixed The name of a silo or a silo instance. If empty, all silos are returned.
return array An array of MediaAsset highlight assets
    public static function highlights($path = null)
    {
        $highlights = array();
        if (isset($path)) {
            $silo = Media::get_silo($path);
            return $silo->silo_highlights();
        } else {
            self::init_silos();
            foreach (self::$silos as $silo) {
                $highlights = $highlights + self::highlights($silo);
            }
        }
        return $highlights;
    }