Skip to content
Code-Schnipsel Gruppen Projekte
AbstractOrderingStep.php 2,06 KiB
Newer Older
  • Learn to ignore specific revisions
  •  * This file contains QUI\ERP\Order\Controls\AbstractOrderingStep
    
     */
    
    namespace QUI\ERP\Order\Controls;
    
    use QUI;
    
    use QUI\Locale;
    use ReflectionClass;
    
    
    /**
     * Class OrderingStepInterface
     * @package QUI\ERP\Order\Controls
     */
    abstract class AbstractOrderingStep extends QUI\Control implements OrderingStepInterface
    {
        /**
    
         * @param Locale|null $Locale
    
        public function getTitle(null | QUI\Locale $Locale = null): string
    
        {
            if ($Locale === null) {
                $Locale = QUI::getLocale();
            }
    
    
            $Reflection = new ReflectionClass($this);
    
    
            return $Locale->get(
                'quiqqer/order',
    
                'ordering.step.title.' . $Reflection->getShortName()
    
        /**
         * Returns a font awesome icon
         * Can be overwritten by each step
         *
         * @return string
         */
    
        public function getIcon(): string
    
        /**
         * Return the current order
         *
    
         * @return QUI\ERP\Order\AbstractOrder
    
        public function getOrder(): QUI\ERP\Order\AbstractOrder
    
        {
            return $this->getAttribute('Order');
        }
    
    
        /**
         * Is the step valid?
         *
         * @return bool
         */
    
        public function isValid(): bool
    
            } catch (QUI\ERP\Order\Exception) {
    
        /**
         * Has the Step its own form?
    
         * Can be overwritten
    
        public function hasOwnForm(): bool
    
        /**
         * It can be overwritten and can be implemented its own functionality
         * eq: Thus it is possible to display settings without the next button
         *
         * @return bool
         */
    
        public function showNext(): bool
    
    Henning Leutz's avatar
    Henning Leutz committed
    
        /**
         * Can be overwritten
         * This method is called when the customer submits an order with costs.
         * So every step can react to the ordering
         */
        public function onExecutePayableStatus()
        {
        }