src/ShopBundle/objects/db/TShopStockMessage.class.php
public function &GetFieldShopStockMessageTrigger()
    {
        $oShopStockMessageTrigger = $this->GetFromInternalCache('oActive_shop_stock_message_trigger_id');
        if (is_null($oShopStockMessageTrigger)) {
            $sQuery = "SELECT *
                     FROM `shop_stock_message_trigger`
                    WHERE `shop_stock_message_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
                      AND `amount` >= '".MySqlLegacySupport::getInstance()->real_escape_string($this->GetArticle()->getAvailableStock())."'
                 ORDER BY `amount` ASC
                    LIMIT 1
                  ";
            $oShopStockMessageTrigger = TdbShopStockMessageTrigger::GetNewInstance();
            /** @var $oShopStockMessageTrigger TdbShopStockMessageTrigger */
            $oTmp = MySqlLegacySupport::getInstance()->fetch_object(MySqlLegacySupport::getInstance()->query($sQuery));
            //if (!$oShopStockMessageTrigger->LoadFromRow(MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($sQuery)))) $oShopStockMessageTrigger = null;
            if (is_object($oTmp)) {
                if (!$oShopStockMessageTrigger->LoadFromField('id', $oTmp->id)) {
                    $oShopStockMessageTrigger = null;
                }
            } else {
                $oShopStockMessageTrigger = null;
            }
            $this->SetInternalCache('oActive_shop_stock_message_trigger_id', $oShopStockMessageTrigger);
        }

        return $oShopStockMessageTrigger;
    }
public function &GetFieldShopStockMessageTrigger()
    {
        $oShopStockMessageTrigger = $this->GetFromInternalCache('oActive_shop_stock_message_trigger_id');
        if (is_null($oShopStockMessageTrigger)) {
            $sQuery = "SELECT *
                     FROM `shop_stock_message_trigger`
                    WHERE `shop_stock_message_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
                      AND `amount` >= '".MySqlLegacySupport::getInstance()->real_escape_string($this->GetArticle()->getAvailableStock())."'
                 ORDER BY `amount` ASC
                    LIMIT 1
                  ";
            $oShopStockMessageTrigger = TdbShopStockMessageTrigger::GetNewInstance();
            /** @var $oShopStockMessageTrigger TdbShopStockMessageTrigger */
            $oTmp = MySqlLegacySupport::getInstance()->fetch_object(MySqlLegacySupport::getInstance()->query($sQuery));
            //if (!$oShopStockMessageTrigger->LoadFromRow(MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($sQuery)))) $oShopStockMessageTrigger = null;
            if (is_object($oTmp)) {
                if (!$oShopStockMessageTrigger->LoadFromField('id', $oTmp->id)) {
                    $oShopStockMessageTrigger = null;
                }
            } else {
                $oShopStockMessageTrigger = null;
            }
            $this->SetInternalCache('oActive_shop_stock_message_trigger_id', $oShopStockMessageTrigger);
        }

        return $oShopStockMessageTrigger;
    }
public function & GetFieldShopStockMessageTrigger ( ) { $ oShopStockMessageTrigger = $ this -> GetFromInternalCache ( 'oActive_shop_stock_message_trigger_id' ) ; if ( is_null ( $ oShopStockMessageTrigger ) ) { $ sQuery = "SELECT *
                     FROM `shop_stock_message_trigger`
                    WHERE `shop_stock_message_id` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ this -> id ) . "'
                      AND `amount` >= '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ this -> GetArticle ( ) -> getAvailableStock ( ) ) . "'
                 ORDER BY `amount` ASC
                    LIMIT 1
                  " ; $ oShopStockMessageTrigger = TdbShopStockMessageTrigger :: GetNewInstance ( ) ; /** @var $oShopStockMessageTrigger TdbShopStockMessageTrigger */ $ oTmp = MySqlLegacySupport :: getInstance ( ) -> fetch_object ( MySqlLegacySupport :: getInstance ( ) -> query ( $ sQuery ) ) ; //if (!$oShopStockMessageTrigger->LoadFromRow(MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($sQuery)))) $oShopStockMessageTrigger = null; if ( is_object ( $ oTmp ) ) { if ( ! $ oShopStockMessageTrigger -> LoadFromField ( 'id' , $ oTmp -> id ) ) { $ oShopStockMessageTrigger = null ; } } else { $ oShopStockMessageTrigger = null ; } $ this -> SetInternalCache ( 'oActive_shop_stock_message_trigger_id' , $ oShopStockMessageTrigger ) ; } return $ oShopStockMessageTrigger ; }
The method checks the ShopStockMessageTrigger for the current ShopStockMessage
if there is a Match it will return this matching one in the other case
it will return a null object.

@return TdbShopStockMessageTrigger
The method checks the ShopStockMessageTrigger for the current ShopStockMessage if there is a Match it will return this matching one in the other case it will return a null object .