Set the template of the page.

@param Page     $page
@param Template $template

@return string
542782
public function postTemplate(Page $page, Template $template)
    {
        $this->authorize('editTemplate', $page);

        $page->setTemplate($template);

        Event::fire(new Events\PageTemplateWasChanged($page, $template));

        return $page->getCurrentVersion()->getStatus();
    }
884846
public function setPage($page)
    {
        $this->offset = (max(1, (int) $page) - 1) * $this->perPage;

        return $this;
    }
1111041
public static function create(Template $template): self
    {
        $renderTemplateDirective = new self();

        $renderTemplateDirective->type     = self::TYPE;
        $renderTemplateDirective->template = $template;

        return $renderTemplateDirective;
    }
705043
public function setPage($page)
    {
        $this->page = intval($page);
        
        if ($this->page == 0) {
            $this->page = 1;
        }
    }
408502
public function setTemplate( $layout_template )
	{
		$tpl_config = $this->config->getConfig( 'templates' );

		if ( !isset( $tpl_config[$layout_template] ) )
		{
			trigger_error( "Template file '$layout_template' not found." );
			return false;
		}

		$this->layout_template =  ROOT_PATH . '/'. $tpl_config[$layout_template];
	}
1287351
public function page($page)
    {
        //set the page
        $this->layout->page = $page;

        //set the layout content and title
        $this->layout->content = view($page);

        return $this->layout;
    }
727859
public function setPage(\VFou\CmsBundle\Entity\Page $page = null)
    {
        $this->page = $page;

        return $this;
    }
534368
public function setTemplate($template)
    {
        if (!(is_string($template) || $template instanceof TemplateReferenceInterface)) {
            throw new \InvalidArgumentException('The template should be a string or implement TemplateReferenceInterface');
        }
        $this->template = $template;

        return $this;
    }
363707
protected function compileTemplate($template)
	{
		$template = $this->normalizer->normalizeTemplate($template);

		// Parse the template
		$ir = TemplateParser::parse($template);

		// Serialize the representation to PHP
		$php = $this->serializer->serialize($ir->documentElement);
		if (isset($this->optimizer))
		{
			$php = $this->optimizer->optimize($php);
		}

		return $php;
	}
1184986
public function setPreMessageTemplate($template = null)
    {
        if (null !== $template) {
            $template = (string) $template;
        }
        $this->abstractOptions['messageTemplates']
                              [self::PRE_MESSAGE_TEMPLATE_KEY] = $template;
        return $this;
    }
1205047
public function setPageTemplate($template_path)
    {
        // Exclude post types
        $excludedPostTypes = array();
        if (has_filter('Municipio/CustomPostType/ExcludedPostTypes')) {
            $excludedPostTypes = apply_filters('Municipio/CustomPostType/ExcludedPostTypes', $excludedPostTypes);
        }

        if ($post_type = get_post_type()) {
            $post_type_object = get_post_type_object($post_type);

            if (is_object($post_type_object) && $post_type_object->hierarchical == true && $post_type_object->_builtin == false && !in_array($post_type_object->name, $excludedPostTypes)) {
                $template_path = \Municipio\Helper\Template::locateTemplate('page');
            }
        }

        return($template_path);
    }
328330
public function execute(\Template $template)
	{
		if(!Bootstrap::isEnabled())
		{
			return;
		}

		foreach($GLOBALS['BOOTSTRAP']['templates']['modifiers'] as $config)
		{
			if($config['disabled'] || !$this->isTemplateAffected($template->getName(), $config['templates']))
			{
				continue;
			}

			if($config['type'] == 'replace')
			{
				if(is_callable($config['replace']))
				{
					$value = call_user_func($config['replace'], $template);
				}
				else
				{
					$value = $config['replace'];
				}

				$template->$config['key'] = str_replace($config['search'], $value, $template->$config['key']);
			}
			elseif($config['type'] == 'callback')
			{
				call_user_func($config['callback'], $template);
			}
		}
	}
1175952
public function setTemplate(Template $template = null)
	{
		if ($this->writeOnce($this->template, $template)) {
			$this->template->addTemplateLayout($this);
		}
	}
45349
public function update(Page $page)
    {
        $attributes = request()->validate(Page::$rules, Page::$messages);

        $attributes['is_header'] = boolval(input('is_header'));
        $attributes['is_hidden'] = boolval(input('is_hidden'));
        $attributes['is_footer'] = boolval(input('is_footer'));
        $attributes['is_featured'] = boolval(input('is_featured'));

        $page = $this->updateEntry($page, $attributes);
        $page->updateUrl()->save();
        $page->banners()->sync(input('banners'));

        return redirect_to_resource();
    }
864593
public function setLayout($template) {
		$layout = $this->getTemplatePathname($template);
		if(!is_file($layout)) {
			throw new \RuntimeException("Layout file `$template` does not exist.");
		} else {
			$this->layout = $template;
		}
	}
454098
public function setPage($page)
    {
        Argument::i()->test(1, 'int');
        
        if ($page < 1) {
            $page = 1;
        }
        
        $this->start = ($page - 1) * $this->range;
        
        return $this;
    }
432652
private function setPage($page)
    {
        $this->page = (int)$page;
        $this->offset = ($page - 1) * $this->limit;
    }