Gc\Document\Model::getIcon PHP 메소드

getIcon() 공개 메소드

(non-PHPdoc)
또한 보기: include Gc\Component\IterableInterface#getIcon()
public getIcon ( ) : mixed
리턴 mixed
    public function getIcon()
    {
        if ($this->getData('icon') === null) {
            $icon = Icon\Model::fromId($this->getDocumentType()->getIconId());
            if (empty($icon)) {
                return false;
            }
            $this->setData('icon', $icon->getUrl());
        }
        return $this->getData('icon');
    }

Usage Example

예제 #1
0
파일: ModelTest.php 프로젝트: gotcms/gotcms
 /**
  * Test
  *
  * @return void
  */
 public function testGetEmptyIcon()
 {
     $this->object->getDocumentType()->setIconId(42000);
     $this->assertFalse($this->object->getIcon());
 }