Xpressengine\Presenter\Presenter::renderType PHP Method

renderType() public method

render 방식 설정 $type [ 'all' => theme, skin 처리 'content' => content 만 render ]
Deprecation:
public renderType ( string $type = self::RENDER_ALL ) : void
$type string render type
return void
    public function renderType($type = self::RENDER_ALL)
    {
        $this->type = $type;
    }

Usage Example

示例#1
0
 /**
  * test render type
  *
  * @return void
  */
 public function testRenderType()
 {
     $request = $this->request;
     $view = $this->view;
     $theme = $this->theme;
     $skin = $this->skin;
     $settings = $this->settings;
     $instanceConfig = $this->instanceConfig;
     $presenter = new Presenter($view, $request, $theme, $skin, $settings, $instanceConfig);
     $type = 'type';
     $presenter->renderType($type);
     $reflection = new \ReflectionClass(get_class($presenter));
     $property = $reflection->getProperty('type');
     $property->setAccessible(true);
     $result = $property->getValue($presenter);
     $this->assertEquals($type, $result);
     $this->assertEquals($type, $presenter->getRenderType());
 }