Check if item is visible.

@return bool
195471
public function isVisible(): bool
    {
        if (!empty($this->item['permission'])) {
            return $this->vault->getGuard()->allows($this->item['permission']);
        }

        //Remove :action
        $target = current(explode(':', $this->getTarget()));

        return $this->vault->getGuard()->allows(
            "{$this->vault->getConfig()->guardNamespace()}.{$target}"
        );
    }
1243994
public function isVisible()
    {
        //jeśli nie jest aktywna
        if (!$this->active) {
            return false;
        }
        //jeśli status różny od aktywna (bieżąca)
        if ($this->status != \Cms\Orm\CmsCategoryRecord::STATUS_ACTIVE) {
            return false;
        }
        //nie osiągnięto czasu publikacji
        if (null !== $this->dateStart && $this->dateStart > date('Y-m-d H:i:s')) {
            return false;
        }
        //przekroczono czas publikacji
        if (null !== $this->dateEnd && $this->dateEnd < date('Y-m-d H:i:s')) {
            return false;
        }
        return true;
    }
843545
def visible(self):
        
        query_results = self.map(lambda el: el.is_displayed(), 'visible').results
        if query_results:
            return all(query_results)
        return False
108303
public function hasItem($key)
    {
        if (!$this->getOptions()->getEnabled()) {
            return false;
        }

        $this->normalizeKey($key);

        $result = false;
        try {
            $result = $this->internalHasItem($key);
        } catch (\Exception $e) {
        }

        return $result;
    }
1187744
public function isVisible()
    {
        if ((!is_array($this->url)) || (!$this->visible)) { // if it's not array, or not visible then just return visible value, no need to check anything
            return $this->visible;
        }
        $controller = isset($this->url[0]) ? $this->url[0] : 'home';
        $action = isset($this->url[1]) ? $this->url[1] : null;
        if (false !== strpos($controller, '/')) {
            list ($module, $controller) = explode('/', $controller, 2);
            if ('..' == $module) {
                $module = '/';
            }
        } else {
            $module = (isset($this->url[2]) && is_string($this->url[2])) ? $this->url[2] : (isset($this->url[3]) ? $this->url[3] : null);
        }
        if (\mpf\WebApp::get()->accessMap && (!\mpf\WebApp::get()->accessMap->canAccess($controller, $action, $module))) {
            return false;
        }
        return true;
    }
287036
public function is_visible() {
        $type = repository::get_type_by_id($this->options['typeid']);
        $instanceoptions = repository::static_function($type->get_typename(), 'get_instance_option_names');

        if ($type->get_visible()) {
            //if the instance is unique so it's visible, otherwise check if the instance has a enabled context
            if (empty($instanceoptions) || $type->get_contextvisibility(context::instance_by_id($this->instance->contextid))) {
                return true;
            }
        }

        return false;
    }
800679
public function hasVisibleSubCats()
    {
        if ($this->_blVisibleSubCats === null) {
            $this->_blVisibleSubCats = false;
            if (($oManufacturerTree = $this->getManufacturerTree())) {
                if (($oManufacturer = $this->getActManufacturer())) {
                    if ($oManufacturer->getId() == 'root') {
                        $this->_blVisibleSubCats = $oManufacturerTree->count();
                        $this->_oSubCatList = $oManufacturerTree;
                    }
                }
            }
        }

        return $this->_blVisibleSubCats;
    }
602141
public function checkVisibility():bool
    {
        if (null === $this->config) {
            return (true);
        }
        $current_env = FEnv::get("framework.env");
        if (property_exists($this->config, "visibility_$current_env")) {
            if (false === $this->config->{"visibility_$current_env"}) {
                return (false);
            } elseif (true === $this->config->{"visibility_$current_env"}) {
                return (true);
            } elseif (null == $this->config->{"visibility_$current_env"}) {
                return (true);
            } else {
                throw new Server500(new \ArrayObject(array("explain" => "Parse Error on ".$this->app.
                    " config.json file : Cannot determine the visibility of $current_env environment",
                    "solution" => "Set the correct visibility [true, false]")));
            }
        }
        return (true);
    }
490745
public function isNewItemAdded()
    {
        if ($this->_blNewITemAdded == null) {
            $this->_blNewITemAdded = (bool) \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("blAddedNewItem");
            \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable("blAddedNewItem");
        }

        return $this->_blNewITemAdded;
    }
155646
public function is_link_enabled() {
		$trail          = $this->get_trail();
		$trail_renderer = $this->get_trail_renderer();
		$total_items    = $trail->get_total_items();
		$index          = $this->get_index();

		return $trail_renderer->get_last_item_link() || $index < $total_items;
	}
489486
public function isVisible()
    {
        // admin preview mode
        if (($blCanPreview = \OxidEsales\Eshop\Core\Registry::getUtils()->canPreview()) !== null) {
            return $blCanPreview;
        }

        // active ?
        $sNow = date('Y-m-d H:i:s');
        if (!$this->oxarticles__oxactive->value &&
            ($this->oxarticles__oxactivefrom->value > $sNow ||
             $this->oxarticles__oxactiveto->value < $sNow
            )
        ) {
            return false;
        }

        // stock flags
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blUseStock') && $this->oxarticles__oxstockflag->value == 2) {
            $iOnStock = $this->oxarticles__oxstock->value + $this->oxarticles__oxvarstock->value;
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blPsBasketReservationEnabled')) {
                $iOnStock += $this->getSession()->getBasketReservations()->getReservedAmount($this->getId());
            }
            if ($iOnStock <= 0) {
                return false;
            }
        }

        return true;
    }
723226
public function getStatus()
    {
        $status = self::STATUS_OK;

        foreach ($this->getItems() as $item) {
            if ($item->getStatus() === self::STATUS_ERROR) {
                return self::STATUS_ERROR;
            }

            if ($item->getStatus() === self::STATUS_WARNING) {
                $status = self::STATUS_WARNING;
            }
        }

        return $status;
    }
98802
private void checkIfEmpty(){
        if(emptyView != null){
            emptyView.setVisibility(getItemCount() > 0 ? View.GONE : View.VISIBLE);
        }
    }
595237
protected boolean checkVisible() {

        return getHoverbar().getController().isEditable()
            && !CmsSitemapView.getInstance().isModelPageMode()
            && (!CmsSitemapView.getInstance().isGalleryMode() || getHoverbar().getController().getData().isGalleryManager());
    }
464867
public function isSuccessful()
    {
        if ($this->getState() === static::STATE_NOT_RUNNING) {
            foreach ($this->items as $run) {
                if (!$run->isSuccessful()) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
680641
protected function getVisibleItems()
    {
        if (count($this->data) <= $this->visibleCount) {
            return $this->data;
        }
        $visible = [];
        $iterator = (new ArrayObject($this->data))->getIterator();
        while (count($visible) < $this->visibleCount && $iterator->valid()) {
            $visible[] = $iterator->current();
            $iterator->next();
        }

        return $visible;
    }
1215993
public function isSection()
    {
        $is_curr = $this->isCurrent();
        $curr = Director::get_current_page();

        return $is_curr || (
            ($curr instanceof CatalogueCategory || $curr instanceof CatalogueProduct) && in_array($this->owner->ID, $curr->getAncestors()->column())
        );
    }