Finish the refactoring for Json.

This commit is contained in:
Sébastien Lucas 2014-01-08 10:54:16 +01:00
parent 91aa062860
commit 1dfdd22f43
2 changed files with 17 additions and 18 deletions

View file

@ -551,23 +551,6 @@ class Page
if (get_class ($this->entryArray [0]) == "EntryBook") return true;
return false;
}
public function getContentArrayTypeahead () {
$out = array ();
foreach ($this->entryArray as $entry) {
if ($entry instanceof EntryBook) {
array_push ($out, array ("class" => $entry->className, "title" => $entry->title, "navlink" => $entry->book->getDetailUrl ()));
} else {
if (empty ($entry->className) xor Base::noDatabaseSelected ()) {
array_push ($out, array ("class" => $entry->className, "title" => $entry->title, "navlink" => $entry->getNavLink ()));
} else {
array_push ($out, array ("class" => $entry->className, "title" => $entry->content, "navlink" => $entry->getNavLink ()));
}
}
}
return $out;
}
}
class PageAllAuthors extends Page