public static function get_search_area_category_by_name($name) {
        if (key_exists($name, self::get_search_area_categories())) {
            return self::get_search_area_categories()[$name];
        } else {
            return self::get_search_area_categories()[self::get_default_area_category_name()];
        }
    }
public static function get_search_area_category_by_name($name) {
        if (key_exists($name, self::get_search_area_categories())) {
            return self::get_search_area_categories()[$name];
        } else {
            return self::get_search_area_categories()[self::get_default_area_category_name()];
        }
    }
public static function get_search_area_category_by_name ( $ name ) { if ( key_exists ( $ name , self :: get_search_area_categories ( ) ) ) { return self :: get_search_area_categories ( ) [ $ name ] ; } else { return self :: get_search_area_categories ( ) [ self :: get_default_area_category_name ( ) ] ; } }
Return search area category instance by category name.

@param string $name Category name. If name is not valid will return default category.

@return \core_search\area_category
Return search area category instance by category name .