SkinaHandler는 등록된 스킨들의 정보를 처리할 때, SkinEntity로 생성하여 사용한다.
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()); }
/** * 타겟에 주어진 스킨을 지정한다. 지정된 정보를 저장소에 저장되고, 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()); }