Example #1
0
 /**
  * Execute the controller.
  *
  * @return  string
  *
  * @since   1.0
  */
 public function execute()
 {
     $table = new GroupsTable($this->getContainer()->get('db'));
     $table->load($this->getContainer()->get('app')->input->getInt('group_id'))->delete();
     $this->getContainer()->get('app')->enqueueMessage(g11n3t('The group has been deleted.'), 'success');
     return parent::execute();
 }
Example #2
0
 /**
  * Method to get a DatabaseQuery object for retrieving the data set from a database.
  *
  * @return  DatabaseQuery  A DatabaseQuery object to retrieve the data set.
  *
  * @since   1.0
  */
 public function getItem()
 {
     $table = new GroupsTable($this->getDb());
     $groupId = $this->getGroupId();
     return $groupId ? $table->load($groupId)->getIterator() : $table->getIterator();
 }