/** * populateFromObject * * @param ApiPopulatableInterface $object * @param array $ignore * * @return void */ public function populateFromObject(ApiPopulatableInterface $object, array $ignore = []) { if ($object instanceof Domain) { $this->populate($object->toArray(['additionalDomains']), $ignore); } }
/** * populateFromObject * * @param ApiPopulatableInterface $object * @param array $ignore * * @return void */ public function populateFromObject(ApiPopulatableInterface $object, array $ignore = []) { if ($object instanceof Page) { $this->populate($object->toArray(), $ignore); } }
/** * populateFromObject - @todo some properties are missing * * @param ApiPopulatableInterface $object * @param array $ignore * * @return void */ public function populateFromObject(ApiPopulatableInterface $object, array $ignore = []) { if (!$object instanceof Site) { return; } if (!in_array('siteId', $ignore)) { $this->setSiteId($object->getSiteId()); } if (is_object($object->getDomain()) && !in_array('domain', $ignore)) { $this->setDomain($object->getDomain()); } if (!in_array('theme', $ignore)) { $this->setTheme($object->getTheme()); } if (!in_array('siteLayout', $ignore)) { $this->setSiteLayout($object->getSiteLayout()); } if (!in_array('siteTitle', $ignore)) { $this->setSiteTitle($object->getSiteTitle()); } if (is_object($object->getLanguage()) && !in_array('language', $ignore)) { $this->setLanguage($object->getLanguage()); } if (is_object($object->getCountry()) && !in_array('country', $ignore)) { $this->setCountry($object->getCountry()); } if (!in_array('status', $ignore)) { $this->setStatus($object->getStatus()); } if (!in_array('favIcon', $ignore)) { $this->setFavIcon($object->getFavIcon()); } if (!in_array('loginPage', $ignore)) { $this->setLoginPage($object->getLoginPage()); } if (!in_array('notAuthorizedPage', $ignore)) { $this->setNotAuthorizedPage($object->getNotAuthorizedPage()); } if (!in_array('notFoundPage', $ignore)) { $this->setNotFoundPage($object->getNotFoundPage()); } if (!in_array('supportedPageTypes', $ignore)) { $this->setSupportedPageTypes($object->getSupportedPageTypes()); } }