Elgg\Database\AdminNotices::exists PHP Метод

exists() публичный Метод

Check if an admin notice is currently active.
С версии: 1.8.0
public exists ( string $id ) : boolean
$id string The unique ID used to register the notice.
Результат boolean
    function exists($id)
    {
        $old_ia = elgg_set_ignore_access(true);
        $notice = elgg_get_entities_from_metadata(array('type' => 'object', 'subtype' => 'admin_notice', 'metadata_name_value_pair' => array('name' => 'admin_notice_id', 'value' => $id), 'count' => true));
        elgg_set_ignore_access($old_ia);
        return $notice ? true : false;
    }