Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 2.0: Importing class Preparing 2.2.0 release Register the blog sidebar via event handler Preparing 2.1.0 release Adding an event hook PostContentIsRendering CS: PSR1/2 & removing grumphp Creating new hook when a post is updating Creating new hook when post is creating Make the tag test more robust Using new @editor directive for blog post content field Adding new languages to blog Updating block module translations
- Loading branch information
Showing
51 changed files
with
652 additions
and
85 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
30 changes: 7 additions & 23 deletions
30
Sidebar/SidebarExtender.php → Events/Handlers/RegisterBlogSidebar.php
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,47 @@ | ||
<?php | ||
|
||
namespace Modules\Blog\Events; | ||
|
||
class PostContentIsRendering | ||
{ | ||
/** | ||
* @var string The body of the page to render | ||
*/ | ||
private $content; | ||
private $original; | ||
|
||
public function __construct($content) | ||
{ | ||
$this->content = $content; | ||
$this->original = $content; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getContent() | ||
{ | ||
return $this->content; | ||
} | ||
|
||
/** | ||
* @param string $content | ||
*/ | ||
public function setContent($content) | ||
{ | ||
$this->content = $content; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function getOriginal() | ||
{ | ||
return $this->original; | ||
} | ||
|
||
public function __toString() | ||
{ | ||
return $this->getContent(); | ||
} | ||
} |
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,10 @@ | ||
<?php | ||
|
||
namespace Modules\Blog\Events; | ||
|
||
use Modules\Core\Contracts\EntityIsChanging; | ||
use Modules\Core\Events\AbstractEntityHook; | ||
|
||
class PostIsCreating extends AbstractEntityHook implements EntityIsChanging | ||
{ | ||
} |
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,30 @@ | ||
<?php | ||
|
||
namespace Modules\Blog\Events; | ||
|
||
use Modules\Blog\Entities\Post; | ||
use Modules\Core\Contracts\EntityIsChanging; | ||
use Modules\Core\Events\AbstractEntityHook; | ||
|
||
class PostIsUpdating extends AbstractEntityHook implements EntityIsChanging | ||
{ | ||
/** | ||
* @var Post | ||
*/ | ||
private $post; | ||
|
||
public function __construct(Post $post, array $data) | ||
{ | ||
parent::__construct($data); | ||
|
||
$this->post = $post; | ||
} | ||
|
||
/** | ||
* @return Post | ||
*/ | ||
public function getPost() | ||
{ | ||
return $this->post; | ||
} | ||
} |
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
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
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
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
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
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,24 @@ | ||
<?php | ||
|
||
return [ | ||
'title' => [ | ||
'tag' => 'Etiquetas', | ||
'create tag' => 'Crear una etiqueta', | ||
'edit tag' => 'Editar una etiqueta', | ||
], | ||
'button' => [ | ||
'create tag' => 'Crear una etiqueta', | ||
], | ||
'table' => [ | ||
'name' => 'Nombre', | ||
'slug' => 'URL amigable', | ||
], | ||
'form' => [ | ||
'name' => 'Nombre', | ||
'slug' => 'URL amigable', | ||
], | ||
'messages' => [ | ||
], | ||
'validation' => [ | ||
], | ||
]; |
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
Oops, something went wrong.