src/Transaction/Transaction.php
public function getModifiersByType($type)
    {
        $modifiers = [];

        foreach ($this->modifiers as $modifier) {
            if ($modifier->getType() === $type) {
                $modifiers[$modifier->getIdentifier()->getFull()] = $modifier;
            }
        }

        return $modifiers;
    }
public function getModifiersByType($type)
    {
        $modifiers = [];

        foreach ($this->modifiers as $modifier) {
            if ($modifier->getType() === $type) {
                $modifiers[$modifier->getIdentifier()->getFull()] = $modifier;
            }
        }

        return $modifiers;
    }
public function getModifiersByType ( $ type ) { $ modifiers = [ ] ; foreach ( $ this -> modifiers as $ modifier ) { if ( $ modifier -> getType ( ) === $ type ) { $ modifiers [ $ modifier -> getIdentifier ( ) -> getFull ( ) ] = $ modifier ; } } return $ modifiers ; }
Returns modifiers on the transaction by TranactionModifierType
@param  string $type
@throws \InvalidArgumentException
@return \Heystack\Ecommerce\Transaction\Interfaces\TransactionModifierInterface[]
Returns modifiers on the transaction by TranactionModifierType