Add Category Batch
Open Form/Articles/BatchDefinition.php
and add new configuration.
// src/Blog/Admin/Form/Articles/BatchDefinition.php
// ...
class BatchDefinition implements FieldDefinitionInterface
{
public function define(Form $form)
{
$form->wrap(null, 'batch', function (Form $form)
{
// Add Category field
$form->add('category_id', new CategoryListField)
->label('Category')
->addOption(new Option('-- Select Category --'));
// Language
$form->add('language', new ListField)
->label('Language')
->set('class', 'col-md-12')
->addOption(new Option('-- Select Language --', ''))
->addOption(new Option('English', 'en-GB'))
->addOption(new Option('Chinese Traditional', 'zh-TW'))
// Add FR-fr language
->addOption(new Option('French', 'FR-fr'));
// ...
});
}
}
Then we can batch move articles items to other category or language.
Or copy it.
The title will auto increment.
Found a typo? Help us improve this document.
This document is for Windwalker Joomla RAD, if you are finding Windwalker PHP framework, please see: Windwalker Framework