public function getMessaging(CNabuCustomer $nb_customer = null, string $field = NABU_MESSAGING_FIELD_ID, bool $force = false)
    {
        if ($nb_customer !== null && ($this->nb_messaging === null || $force)) {
            $this->nb_messaging = null;
            if ($this instanceof CNabuDataObject && $this->contains(NABU_MESSAGING_FIELD_ID)) {
                $this->nb_messaging = $nb_customer->getMessaging($this);
            }
        }

        return $this->nb_messaging;
    }
public function getMessaging(CNabuCustomer $nb_customer = null, string $field = NABU_MESSAGING_FIELD_ID, bool $force = false)
    {
        if ($nb_customer !== null && ($this->nb_messaging === null || $force)) {
            $this->nb_messaging = null;
            if ($this instanceof CNabuDataObject && $this->contains(NABU_MESSAGING_FIELD_ID)) {
                $this->nb_messaging = $nb_customer->getMessaging($this);
            }
        }

        return $this->nb_messaging;
    }
public function getMessaging ( CNabuCustomer $ nb_customer = null , string $ field = NABU_MESSAGING_FIELD_ID , bool $ force = false ) { if ( $ nb_customer !== null && ( $ this -> nb_messaging === null || $ force ) ) { $ this -> nb_messaging = null ; if ( $ this instanceof CNabuDataObject && $ this -> contains ( NABU_MESSAGING_FIELD_ID ) ) { $ this -> nb_messaging = $ nb_customer -> getMessaging ( $ this ) ; } } return $ this -> nb_messaging ; }
Gets the Messaging instance.
@param null|CNabuCustomer $nb_customer If you want to get the Messaging in safe mode, you need to pass
this parameter to grant the Customer that owns the Messaging where the Messaging is placed.
In any other case, the Messaging could not be retrieved.
@param string $field Field name where the site id will be stored.
@param bool $force If true, then tries to reload Messaging instance from their storage.
@return CNabuMessaging|null Returns the Messaging instance if setted or null if not.
Gets the Messaging instance .