/** * Initialize this class and set the static variables. */ public static function initialize() { $maxItemsSetting = Civi::settings()->get('recentItemsMaxCount'); if (isset($maxItemsSetting) && $maxItemsSetting > 0 && $maxItemsSetting < self::MAX_ITEMS) { self::$_maxItems = $maxItemsSetting; } if (!self::$_recent) { $session = CRM_Core_Session::singleton(); self::$_recent = $session->get(self::STORE_NAME); if (!self::$_recent) { self::$_recent = array(); } } }