src/Service/Emailer.php
protected static function addType(\stdClass $oData, array &$aArray): bool
    {
        if (!empty($oData->slug) && !empty($oData->template_body)) {

            $aArray[$oData->slug] = (object) [
                'slug'             => $oData->slug,
                'name'             => $oData->name,
                'description'      => $oData->description,
                'isUnsubscribable' => property_exists($oData, 'isUnsubscribable') ? (bool) $oData->isUnsubscribable : true,
                'template_header'  => empty($oData->template_header) ? 'email/structure/header' : $oData->template_header,
                'template_body'    => $oData->template_body,
                'template_footer'  => empty($oData->template_footer) ? 'email/structure/footer' : $oData->template_footer,
                'default_subject'  => $oData->default_subject,
            ];

            return true;
        }

        return false;
    }
protected static function addType(\stdClass $oData, array &$aArray): bool
    {
        if (!empty($oData->slug) && !empty($oData->template_body)) {

            $aArray[$oData->slug] = (object) [
                'slug'             => $oData->slug,
                'name'             => $oData->name,
                'description'      => $oData->description,
                'isUnsubscribable' => property_exists($oData, 'isUnsubscribable') ? (bool) $oData->isUnsubscribable : true,
                'template_header'  => empty($oData->template_header) ? 'email/structure/header' : $oData->template_header,
                'template_body'    => $oData->template_body,
                'template_footer'  => empty($oData->template_footer) ? 'email/structure/footer' : $oData->template_footer,
                'default_subject'  => $oData->default_subject,
            ];

            return true;
        }

        return false;
    }
protected static function addType ( \ stdClass $ oData , array & $ aArray ) : bool { if ( ! empty ( $ oData -> slug ) && ! empty ( $ oData -> template_body ) ) { $ aArray [ $ oData -> slug ] = ( object ) [ 'slug' => $ oData -> slug , 'name' => $ oData -> name , 'description' => $ oData -> description , 'isUnsubscribable' => property_exists ( $ oData , 'isUnsubscribable' ) ? ( bool ) $ oData -> isUnsubscribable : true , 'template_header' => empty ( $ oData -> template_header ) ? 'email/structure/header' : $ oData -> template_header , 'template_body' => $ oData -> template_body , 'template_footer' => empty ( $ oData -> template_footer ) ? 'email/structure/footer' : $ oData -> template_footer , 'default_subject' => $ oData -> default_subject , ] ; return true ; } return false ; }
Adds a new email type to the stack

@param  \stdClass $oData  An object representing the email type
@param array      $aArray The array to populate

@return boolean
Adds a new email type to the stack