[phpBB Debug] PHP Warning: in file [ROOT]/ext/tas2580/seourls/event/listener.php on line 213: Undefined array key "FORUM_NAME"
REDAXO Forum • [SOLVED] OOArticle getArticleById vs rex_articleget(…)
Seite 1 von 1

[SOLVED] OOArticle getArticleById vs rex_articleget(…)

Verfasst: 1. Dez 2015, 10:31
von Thomas.Skerbis
Wie muss folgender Code in Redaxo 5 aussehen?

OOArticle gibt es ja nicht mehr.
Ein simples Ersetzen durch rex_article führt nicht zum Ziel.

Code: Alles auswählen

$tree_article = OOArticle::getArticleById($this->getValue('article_id')); 
:D UPDATE:
Hier gefunden: http://www.redaxo.org/docs/master/class ... ticle.html

Code: Alles auswählen

$tree_article = rex_article::getCurrent();  

Re: OOArticle getArticleById vs rex_article

Verfasst: 1. Dez 2015, 11:13
von Gregor.Harlan
Die Methoden wurden auch noch teilweise umbenannt.
In deinem Fall:

Code: Alles auswählen

rex_article::get(...)
// statt
OOArticle::getArticleById(...)

Re: OOArticle getArticleById vs rex_article

Verfasst: 1. Dez 2015, 11:55
von Thomas.Skerbis
rex_article::get($this->getValue("article_id"));
ok? Und danke.