Finish the refactoring for Json.
This commit is contained in:
parent
91aa062860
commit
1dfdd22f43
2 changed files with 17 additions and 18 deletions
17
base.php
17
base.php
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue