Backend\Core\Engine\Model::deleteExtrasForData PHP Method

deleteExtrasForData() public static method

Delete all extras for a certain value in the data array of that module_extra.
public static deleteExtrasForData ( string $module, string $field, string $value, string $action = null )
$module string The module for the extra.
$field string The field of the data you want to check the value for.
$value string The value to check the field for.
$action string In case you want to search for a certain action.
    public static function deleteExtrasForData($module, $field, $value, $action = null)
    {
        $ids = self::getExtrasForData((string) $module, (string) $field, (string) $value, $action);
        // we have extras
        if (!empty($ids)) {
            // delete extras
            self::getContainer()->get('database')->delete('modules_extras', 'id IN (' . implode(',', $ids) . ')');
        }
    }