mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 18:14:26 +02:00
e_admin batch hook completed. see e107_plugins/_blank/e_admin.php for example.
This commit is contained in:
@@ -23,7 +23,9 @@ class _blank_admin
|
||||
switch($type)
|
||||
{
|
||||
case "news": // hook into the news admin form.
|
||||
$config['fields']['url'] = array ( 'title' =>"CUstom Field", 'type' => 'url', 'tab'=>1, 'writeParms'=> array('size'=>'xxlarge', 'placeholder'=>'', 'default'=>$defaultValue), 'width' => 'auto', 'help' => '', 'readParms' => '', 'class' => 'left', 'thclass' => 'left', );
|
||||
$config['fields']['url'] = array ( 'title' =>"Custom Field", 'type' => 'url', 'tab'=>1, 'writeParms'=> array('size'=>'xxlarge', 'placeholder'=>'', 'default'=>$defaultValue), 'width' => 'auto', 'help' => '', 'readParms' => '', 'class' => 'left', 'thclass' => 'left', );
|
||||
|
||||
$config['batchOptions'] = array('custom' => 'Custom Batch Command');
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -37,20 +39,28 @@ class _blank_admin
|
||||
/**
|
||||
* Process Posted Data.
|
||||
* @param object $ui admin-ui
|
||||
* @param int $id - Primary ID of the record being created/edited/deleted
|
||||
* @param int|array $id - Primary ID of the record being created/edited/deleted or array data of a batch process.
|
||||
*/
|
||||
public function process($ui, $id=0)
|
||||
{
|
||||
|
||||
$data = $ui->getPosted();
|
||||
$type = $ui->getEventName();
|
||||
$action = $ui->getAction(); // current mode: create, edit, list
|
||||
$action = $ui->getAction(); // current mode: create, edit, list, batch
|
||||
|
||||
if($action == 'delete')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if($action == 'batch')
|
||||
{
|
||||
$arrayOfRecordIds = $id['ids'];
|
||||
$command = $id['cmd'];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(!empty($id) )
|
||||
{
|
||||
|
Reference in New Issue
Block a user