Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved BookControl2 into separate file
- Loading branch information
1 parent
07c7a4f
commit 3487329
Showing
3 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
namespace Nexendrie\BookComponent; | ||
|
||
class BookControl2 extends BookControl { | ||
function __construct() { | ||
parent::__construct("Test", __DIR__); | ||
} | ||
|
||
/** | ||
* @return BookPagesStorage | ||
*/ | ||
function getPages() { | ||
$storage = new BookPagesStorage; | ||
$storage[] = new BookPage("slug1", "title1"); | ||
$storage[] = new BookPage("slug2", "title2"); | ||
$storage[] = new BookPage("slug3", "title3"); | ||
return $storage; | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
function renderSlug1() { | ||
$this->template->var = "Lorem Ipsum."; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters