Beispiel #1
0
 /**
  * Constructor.
  *
  * @param   JInput            $input  The input object.
  * @param   JApplicationBase  $app    The application object.
  */
 public function __construct(JInput $input = null, JApplicationBase $app = null)
 {
     parent::__construct($input, $app);
     // Use the default database.
     $this->setDatabase();
     // Set the controller options.
     $serviceOptions = array('contentType' => 'application/vnd.joomla.list.v1', 'describedBy' => 'http://docs.joomla.org/Schemas/articles/v1', 'embeddedMap' => __DIR__ . '/embedded.json', 'primaryRel' => 'joomla:articles', 'resourceMap' => realpath(__DIR__ . '/../resource.json'), 'self' => '/joomla:articles', 'tableName' => '#__content');
     $this->setOptions($serviceOptions);
 }
Beispiel #2
0
 /**
  * Constructor.
  *
  * @param   JInput            $input  The input object.
  * @param   JApplicationBase  $app    The application object.
  */
 public function __construct(JInput $input = null, JApplicationBase $app = null)
 {
     parent::__construct($input, $app);
     // Use the default database.
     $this->setDatabase();
     // Set the controller options.
     $serviceOptions = array('resourceMap' => __DIR__ . '/../resource.json');
     $this->setOptions($serviceOptions);
 }