/** * @param array $p_authorBiography * @return void */ public function setBiography(array $p_biography) { if (empty($p_biography) || !isset($p_biography['language'])) { return false; } $biographyObj = new AuthorBiography($this->getId(), $p_biography['language']); if (isset($p_biography['biography']) && !empty($p_biography['biography'])) { $biographyObj->setProperty('biography', $p_biography['biography'], false); } if (isset($p_biography['first_name']) && !empty($p_biography['first_name'])) { $biographyObj->setProperty('first_name', $p_biography['first_name'], false); } if (isset($p_biography['last_name']) && !empty($p_biography['last_name'])) { $biographyObj->setProperty('last_name', $p_biography['last_name'], false); } if ($biographyObj->exists()) { $biographyObj->commit(); } else { $biographyObj->create(); } }
$network_links = ""; $email = ""; $biography = ""; $aliases = null; $lang_first_name = ""; $lang_last_name = ""; $id = Input::Get("id", "int", 0); if ($id > 0) { $getBio = Input::Get("getBio", "int", 0); $author = new Author($id); if ($getBio == 1) { $json = '{"first_name":"","last_name":"","biography":""}'; $language = Input::Get("language", "int", 0); $bioObj = new AuthorBiography($author->getId(), $language); if ($bioObj->exists()) { $json = '{"first_name":"'.addslashes($bioObj->getFirstName()) .'","last_name":"'.addslashes($bioObj->getLastName()) .'","biography":"'.addslashes($bioObj->getBiography()) .'"}'; } echo $json; exit(); } if ($getNames == 1) { } $first_name = $author->getFirstName(); $last_name = $author->getLastName(); $type = $author->getType(); $skype = $author->getSkype();