![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/magento/module-sales/Block/Order/History/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Sales\Block\Order\History; /** * Sales order history extra container block * * @api * @since 100.1.1 */ class Container extends \Magento\Framework\View\Element\Template { /** * @var \Magento\Sales\Api\Data\OrderInterface */ private $order; /** * Set order * * @param \Magento\Sales\Api\Data\OrderInterface $order * @return $this * @since 100.1.1 */ public function setOrder(\Magento\Sales\Api\Data\OrderInterface $order) { $this->order = $order; return $this; } /** * Get order * * @return \Magento\Sales\Api\Data\OrderInterface */ private function getOrder() { return $this->order; } /** * Here we set an order for children during retrieving their HTML * * @param string $alias * @param bool $useCache * @return string * @throws \Magento\Framework\Exception\LocalizedException * @since 100.1.1 */ public function getChildHtml($alias = '', $useCache = false) { $layout = $this->getLayout(); if ($layout) { $name = $this->getNameInLayout(); foreach ($layout->getChildBlocks($name) as $child) { $child->setOrder($this->getOrder()); } } return parent::getChildHtml($alias, $useCache); } }