public function __get($property)
 {
     switch ($property) {
         case 'contentInfo':
             return $this->content->contentInfo;
         case 'id':
             return $this->content->id;
         case 'versionInfo':
             return $this->getVersionInfo();
         case 'fields':
             return $this->getFields();
     }
     return parent::__get($property);
 }
 /**
  * Test for the updateUser() method.
  *
  * @param \eZ\Publish\API\Repository\Values\User\User $user
  *
  * @return void
  * @see \eZ\Publish\API\Repository\UserService::updateUser()
  * @depends eZ\Publish\API\Repository\Tests\UserServiceTest::testUpdateUser
  */
 public function testUpdateUserReturnsPublishedVersion($user)
 {
     $this->assertEquals(VersionInfo::STATUS_PUBLISHED, $user->getVersionInfo()->status);
 }
Example #3
0
 /**
  * @return Values\RestUser
  */
 private function buildRestUserObject(RepositoryUser $user)
 {
     return new Values\RestUser($user, $this->contentTypeService->loadContentType($user->contentInfo->contentTypeId), $user->contentInfo, $this->locationService->loadLocation($user->contentInfo->mainLocationId), $this->contentService->loadRelations($user->getVersionInfo()));
 }
Example #4
0
 /**
  * Magic isset for signaling existence of convenience properties.
  *
  * @param string $property
  *
  * @return bool
  */
 public function __isset($property)
 {
     if ($property === 'contentInfo') {
         return true;
     }
     if ($property === 'id') {
         return true;
     }
     if ($property === 'versionInfo') {
         return true;
     }
     if ($property === 'fields') {
         return true;
     }
     return parent::__isset($property);
 }