public function getTargets($force = false) : CNabuSiteTargetList
    {
        if (!$this->isBuiltIn() &&
            ($this->nb_site_target_list->isEmpty() || $force)
        ) {
            $this->nb_site_target_list->clear();
            $this->nb_site_target_list->merge(CNabuSiteTarget::getAllSiteTargets($this));
            $this->nb_site_target_list->iterate(function ($key, $nb_site_target) {
                $nb_site_target->setSite($this);
                return true;
            });
        }

        return $this->nb_site_target_list;
    }
public function getTargets($force = false) : CNabuSiteTargetList
    {
        if (!$this->isBuiltIn() &&
            ($this->nb_site_target_list->isEmpty() || $force)
        ) {
            $this->nb_site_target_list->clear();
            $this->nb_site_target_list->merge(CNabuSiteTarget::getAllSiteTargets($this));
            $this->nb_site_target_list->iterate(function ($key, $nb_site_target) {
                $nb_site_target->setSite($this);
                return true;
            });
        }

        return $this->nb_site_target_list;
    }
public function getTargets ( $ force = false ) : CNabuSiteTargetList { if ( ! $ this -> isBuiltIn ( ) && ( $ this -> nb_site_target_list -> isEmpty ( ) || $ force ) ) { $ this -> nb_site_target_list -> clear ( ) ; $ this -> nb_site_target_list -> merge ( CNabuSiteTarget :: getAllSiteTargets ( $ this ) ) ; $ this -> nb_site_target_list -> iterate ( function ( $ key , $ nb_site_target ) { $ nb_site_target -> setSite ( $ this ) ; return true ; } ) ; } return $ this -> nb_site_target_list ; }
Gets the Target list associated with this instance.
@param bool $force If true forces to reload entire list from database.
@return CNabuSiteTargetList Returns the list instance containing all associated contents.
Gets the Target list associated with this instance .