Commit f9080069 authored by Jakub Konečný's avatar Jakub Konečný

deprecated some getters and setters of BookControl and BookPage

parent 64465c2b
Version 2.2.0-dev
- raised minimal version of PHP to 7.3
- deprecated some getters and setters of BookControl and BookPage
Version 2.1.1
- re-added support for Latte 2.5
......
......@@ -61,20 +61,32 @@ class BookControl extends \Nette\Application\UI\Control {
throw new \RuntimeException("File $path does not exist.");
}
}
/**
* @deprecated Access the property directly
*/
public function getIndexTemplate(): string {
return $this->indexTemplate;
}
/**
* @deprecated Access the property directly
*/
public function setIndexTemplate(string $indexTemplate): void {
$this->checkTemplatePath($indexTemplate);
$this->indexTemplate = $indexTemplate;
}
/**
* @deprecated Access the property directly
*/
public function getPageTemplate(): string {
return $this->pageTemplate;
}
/**
* @deprecated Access the property directly
*/
public function setPageTemplate(string $pageTemplate): void {
$this->checkTemplatePath($pageTemplate);
$this->pageTemplate = $pageTemplate;
......
......@@ -22,11 +22,17 @@ class BookPage {
$this->slug = $slug;
$this->title = $title;
}
/**
* @deprecated Access the property directly
*/
public function getSlug(): string {
return $this->slug;
}
/**
* @deprecated Access the property directly
*/
public function getTitle(): string {
return $this->title;
}
......@@ -37,7 +43,10 @@ class BookPage {
public function addCondition(IBookPageCondition $condition, $parameter): void {
$this->conditions[] = [$condition, $parameter];
}
/**
* @deprecated Access the property directly
*/
public function isAllowed(): bool {
foreach($this->conditions as $condition) {
if(!$condition[0]->isAllowed($condition[1])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment