PHP code example of webwerkwien / contao-ai-core-bundle
1. Go to this page and download the library: Download webwerkwien/contao-ai-core-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webwerkwien / contao-ai-core-bundle example snippets
#[AsCommand(name: 'contao:shop:confirm', description: 'Confirm a pending order')]
#[\Webwerkwien\ContaoAiCoreBundle\Attribute\AiContract(
writes: true,
tables: ['tl_shop_order', 'tl_shop_voucher'],
trace: ['tl_log'],
traceWhen: 'before',
irreversible: 'sends a confirmation mail to the customer',
repeatable: false,
answerShape: ['status', 'id'],
genericPathUnsuitable: ['tl_shop_order' => 'the transitions hang on save_callbacks'],
)]
class ConfirmOrderCommand extends Command { /* … */ }
$report = $builder->build($e, 'backend', ['tool' => 'news_update'], [$apiKey]);
$report->toMarkdown(); // summary only — nothing worth protecting
$report->toMarkdown(true); // plus the masked exception message
$report->toBbCode(true); // same, as vBulletin markup for the forum
$report->withoutMessage(); // strip the sensitive half for good