/**
  * Add a delete button
  */
 protected function addToolbarDelete()
 {
     // Add a delete button
     if (!$this->user->authorise('core.delete', 'com_media')) {
         return;
     }
     // Instantiate a new JLayoutFile instance and render the layout
     $layout = new JLayoutFile('toolbar.deletemedia');
     $this->bar->appendButton('Custom', $layout->render(array()), 'upload');
     JToolbarHelper::divider();
 }
예제 #2
0
 /**
  * Tests the appendButton method
  *
  * @return  void
  *
  * @since   3.0
  */
 public function testAppendButton()
 {
     $this->assertThat($this->object->appendButton('Separator', 'divider'), $this->isTrue());
 }