Guten Tag zusammen!
Ich versuche mich an einem ersten Bau einer Erweiterung.
Dabei Versuche ich diese, Tutorial zu folgen:
J3.x:Developing an MVC Component/Adding a model to the site part - Joomla! Documentation
Leider scheitere ich bereits in Schritt 5. "Adding a model to the site part".
Ich habe meine Erweiterung statt HelloWorld "Sprechtag" genannt. Daher habe ich einfach stumpf alle HelloWorlds durch Sprechtag ersetzt. Bis Schritt 4 ging alles gut. Jetzt bekomme ich folgenden Fehler angezeigt:
Fatal error: Class SprechtagModelSprechtag contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Joomla\CMS\MVC\Model\ItemModelInterface::getItem) in F:\usbwebserver\root\components\com_sprechtag\models\sprechtag.php on line 18
Das ist die Datei sprechtag.php im Ordner models:
<?php
/**
* @package Joomla.Administrator
* @subpackage com_sprechtag
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Sprechtag Model
*
* @since 0.0.1
*/
class SprechtagModelSprechtag extends JModelItem
{
/**
* @var string message
*/
protected $message;
/**
* Get the message
*
* @return string The message to be displayed to the user
*/
public function getMsg()
{
if (!isset($this->message))
{
$this->message = 'Sprechtag-Termine';
}
return $this->message;
}
}
Alles anzeigen
Ich wäre sehr dankbar, wenn mir jemand auf die Sprünge helfen kann. Vielen Dank!