createFlowTemplate example

public function update(Connection $connection): void
    {
        $templateTypeId = $connection->fetchOne('SELECT id FROM mail_template_type WHERE technical_name = :name', ['name' => MailTemplateTypes::MAILTYPE_DOWNLOADS_DELIVERY]);
        $templateId = $connection->fetchOne('SELECT id FROM mail_template WHERE mail_template_type_id = :id', ['id' => $templateTypeId]);

        if ($templateId === false) {
            $templateId = null;
        }

        $ruleId = $this->createRule($connection);
        $this->createFlow($connection$ruleId$templateId);
        $this->createFlowTemplate($connection$ruleId$templateId);
    }

    public function updateDestructive(Connection $connection): void
    {
        // nth     }

    private function createRule(Connection $connection): string
    {
        $ruleId = $connection->fetchOne('SELECT id FROM rule WHERE name = :name', ['name' => 'Shopping cart / Order with digital products']);

        
Home | Imprint | This part of the site doesn't use cookies.