Define User Action
UI Integration
Arguments
Crud integration

Compared to 1.x versions Crud implementation has became much more lightweight, however you retain all the same functionality and more. Next example shows how you can disable user action (add) entirely, or on per-row basis (delete) and how you could add your own action with a custom trigger button and even a preview.

$country = new Country($owner->getApp()->db);
$country->getUserAction('add')->enabled = false;
$country->getUserAction('delete')->enabled = static function (Country $m) {
    return $m->id % 2 === 0;
};
$country->addUserAction('mail', [
    'appliesTo' => Model\UserAction::APPLIES_TO_SINGLE_RECORD,
    'preview' => static function (Country $model) {
        return 'Here is email preview for ' . $model->name;
    },
    'callback' => static function (Country $model) {
        return 'Email sent to ' . $model->name;
    },
    'description' => 'Email testing',
]);

// register a trigger for mail action in Crud
$owner->getExecutorFactory()->registerTrigger(
    ExecutorFactory::TABLE_BUTTON,
    [Button::class, null, 'icon' => 'blue mail'],
    $country->getUserAction('mail')
);
Crud::addTo($owner, ['ipp' => 5])
    ->setModel($country, [$country->fieldName()->name, $country->fieldName()->iso]);
Name
ISO
AfghanistanAF
AlbaniaAL
AlgeriaDZ
American SamoaAS
AndorraAD
$model = new Stat($owner->getApp()->db);

$model->addUserAction('mail', [
    'fields' => [$model->fieldName()->currency],
    'appliesTo' => Model\UserAction::APPLIES_TO_SINGLE_RECORD,
    'callback' => static function (Stat $model) {
        return 'Email sent in ' . $model->currency . ' currency';
    },
    'description' => 'Email testing',
]);

CardDeck::addTo($owner)
    ->setModel(
        $model,
        [$model->fieldName()->description]
    );
Agile DSQL
DSQL is a composable SQL query builder. You can write multi-vendor queries in PHP profiting from better security, clean syntax and avoid human errors.
Edit
Delete
Mail
Agile Core
Collection of PHP Traits for designing object-oriented frameworks.
Edit
Delete
Mail
Agile Data
Agile Data implements an entirely new pattern for data abstraction, that is specifically designed for remote databases such as RDS, Cloud SQL, BigQuery and other distributed data storage architectures. It focuses on reducing number of requests your App have to send to the Database by using more sophisticated queries while also offering full Domain Model mapping and Database vendor abstraction.
Edit
Delete
Mail
Agile UI
Web UI Component library.
Edit
Delete
Mail