本文整理汇总了PHP中AppBundle\Entity\User::getFullName方法的典型用法代码示例。如果您正苦于以下问题:PHP User::getFullName方法的具体用法?PHP User::getFullName怎么用?PHP User::getFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppBundle\Entity\User
的用法示例。
在下文中一共展示了User::getFullName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCreateNewEntity
/**
* Test creation of new entity
*/
public function testCreateNewEntity()
{
$user = new User();
$this->assertNull($user->getId());
$this->assertFalse($user->isEnabled());
$this->assertNull($user->getCreatedAt());
$this->assertNull($user->getUpdatedAt());
$this->assertNull($user->getFullName());
$this->assertNull($user->getPhone());
}
示例2: testEmptyUser
/**
* Test an empty User entity
*/
public function testEmptyUser()
{
$user = new User();
$this->assertEquals('New User', $user->__toString());
$this->assertNull($user->getId());
$this->assertNull($user->getFullName());
$this->assertNull($user->getFacebookAccessToken());
$this->assertNull($user->getFacebookId());
$this->assertEquals(0, $user->getItems()->count());
}
示例3: checkAccess
public function checkAccess(CrudEvent $event)
{
if (!$this->user instanceof User) {
return;
}
$data = $event->getData();
if ($data instanceof FormInterface) {
$data = $data->getData();
}
if ($data instanceof User) {
if ($data !== $this->user) {
throw new AccessDeniedException($this->user->getFullName() . ' is not allowed to update ' . $data->getFullName());
}
} elseif (method_exists($data, 'getUser') && $this->user !== $data->getUser()) {
throw new AccessDeniedException($this->user->getFullName() . ' is not allowed to update ' . $data->getFullName() . '\'s data');
} elseif (method_exists($data, 'getAuthor') && $this->user !== $data->getAuthor()) {
throw new AccessDeniedException($this->user->getFullName() . ' is not allowed to update ' . $data->getFullName() . '\'s data');
}
}
示例4: getFullName
/**
* {@inheritDoc}
*/
public function getFullName()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getFullName', array());
return parent::getFullName();
}