SkinaHandler는 등록된 스킨들의 정보를 처리할 때, SkinEntity로 생성하여 사용한다.
Author: XE Developers (developers@xpressengine.com)
Inheritance: implements Illuminate\Contracts\Support\Arrayable, implements Illuminate\Contracts\Support\Jsonable
Exemplo n.º 1
0
 public function testToArray()
 {
     $entity = new SkinEntity(TestSkin::getId(), TestSkin::class);
     $this->assertEquals(['id' => 'test.skin', 'title' => null, 'class' => 'Xpressengine\\Tests\\Skin\\TestSkin', 'description' => null, 'screenshot' => 'screenshot'], $entity->toArray());
 }
Exemplo n.º 2
0
 /**
  * 타겟에 주어진 스킨을 지정한다. 지정된 정보를 저장소에 저장되고, getAssigned() 메소드를 통해 조회할 수 있다.
  *
  * @param string      $target 타겟
  * @param SkinEntity  $skin   스킨
  * @param string|null $mode   'mobile' or 'desktop'
  *
  * @return void
  */
 public function assign($target, SkinEntity $skin, $mode = 'desktop')
 {
     $storeKey = $this->mergeKey($target);
     // set skin id
     $this->store->setSelectedSkin($storeKey, $mode, $skin->getId());
     // set config
     $this->store->setConfigs($storeKey, $skin->getId(), $skin->getConfig());
 }