コード例 #1
0
ファイル: Managestock.php プロジェクト: Doability/magento2dev
 /**
  * After change Catalog Inventory Manage Stock value process
  * @return $this
  */
 public function afterSave()
 {
     if ($this->isValueChanged()) {
         $this->_stockIndexerProcessor->markIndexerAsInvalid();
     }
     return parent::afterSave();
 }
コード例 #2
0
ファイル: Backorders.php プロジェクト: Doability/magento2dev
 /**
  * After change Catalog Inventory Backorders value process
  *
  * @return $this
  */
 public function afterSave()
 {
     if ($this->isValueChanged() && ($this->getOldValue() == \Magento\CatalogInventory\Model\Stock::BACKORDERS_NO || $this->getValue() == \Magento\CatalogInventory\Model\Stock::BACKORDERS_NO)) {
         $this->_stockIndexerProcessor->markIndexerAsInvalid();
     }
     return parent::afterSave();
 }
コード例 #3
0
ファイル: Request.php プロジェクト: Rovak/zf2
 /**
  * Create XML request
  *
  * @return string
  */
 public function saveXml()
 {
     $args = $this->_getXmlRpcParams();
     $method = $this->getMethod();
     $generator = AbstractValue::getGenerator();
     $generator->openElement('methodCall')->openElement('methodName', $method)->closeElement('methodName');
     if (is_array($args) && count($args)) {
         $generator->openElement('params');
         foreach ($args as $arg) {
             $generator->openElement('param');
             $arg->generateXml();
             $generator->closeElement('param');
         }
         $generator->closeElement('params');
     }
     $generator->closeElement('methodCall');
     return $generator->flush();
 }
コード例 #4
0
ファイル: Response.php プロジェクト: haoyanfei/zf2
 /**
  * Return response as XML
  *
  * @return string
  */
 public function saveXml()
 {
     $value = $this->_getXmlRpcReturn();
     $generator = AbstractValue::getGenerator();
     $generator->openElement('methodResponse')->openElement('params')->openElement('param');
     $value->generateXml();
     $generator->closeElement('param')->closeElement('params')->closeElement('methodResponse');
     return $generator->flush();
 }
コード例 #5
0
ファイル: Fault.php プロジェクト: Baft/Zend-Form
 /**
  * Serialize fault to XML
  *
  * @return string
  */
 public function saveXml()
 {
     // Create fault value
     $faultStruct = array('faultCode' => $this->getCode(), 'faultString' => $this->getMessage());
     $value = AbstractValue::getXmlRpcValue($faultStruct);
     $generator = AbstractValue::getGenerator();
     $generator->openElement('methodResponse')->openElement('fault');
     $value->generateXml();
     $generator->closeElement('fault')->closeElement('methodResponse');
     return $generator->flush();
 }
コード例 #6
0
ファイル: Contact.php プロジェクト: zource/zource
 private function extractAbstractValue(AbstractValue $value)
 {
     return ['id' => $value->getId(), 'creation_date' => $value->getCreationDate(), 'type' => $value->getType(), 'value' => $value->getValue()];
 }
コード例 #7
0
ファイル: AbstractString.php プロジェクト: zource/zource
 public function __construct(AbstractContact $contact, $type, $value)
 {
     parent::__construct($contact, $type);
     $this->value = $value;
 }