-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from yii2mod/add_markdown_support
add markdown support, create cms module, update README
- Loading branch information
Showing
18 changed files
with
414 additions
and
240 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,30 @@ | ||
<?php | ||
|
||
namespace yii2mod\cms; | ||
|
||
use yii\base\BootstrapInterface; | ||
|
||
/** | ||
* Class Bootstrap | ||
* | ||
* @package yii2mod\cms | ||
*/ | ||
class Bootstrap implements BootstrapInterface | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function bootstrap($app) | ||
{ | ||
if (!isset($app->get('i18n')->translations['yii2mod.cms'])) { | ||
$app->get('i18n')->translations['yii2mod.cms'] = [ | ||
'class' => 'yii\i18n\PhpMessageSource', | ||
'basePath' => '@yii2mod/cms/messages', | ||
]; | ||
} | ||
|
||
if ($app->getModule('comment') === null) { | ||
$app->setModule('comment', ['class' => 'yii2mod\comments\Module']); | ||
} | ||
} | ||
} |
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,45 @@ | ||
<?php | ||
|
||
namespace yii2mod\cms; | ||
|
||
/** | ||
* Class Module | ||
* | ||
* @package yii2mod\cms | ||
*/ | ||
class Module extends \yii\base\Module | ||
{ | ||
/** | ||
* @var string the namespace that controller classes are in | ||
*/ | ||
public $controllerNamespace = 'yii2mod\cms\controllers'; | ||
|
||
/** | ||
* @var string the default route of this module | ||
*/ | ||
public $defaultRoute = 'manage'; | ||
|
||
/** | ||
* @var array imperavi editor options | ||
*/ | ||
public $imperaviEditorOptions = [ | ||
'plugins' => ['video', 'fullscreen', 'table'], | ||
'options' => [ | ||
'minHeight' => 200, | ||
], | ||
]; | ||
|
||
/** | ||
* @var bool whether to enable the markdown editor and markdown converter | ||
*/ | ||
public $enableMarkdown = false; | ||
|
||
/** | ||
* @var array markdown editor options | ||
* | ||
* @see https://github.com/NextStepWebs/simplemde-markdown-editor#configuration | ||
*/ | ||
public $markdownEditorOptions = [ | ||
'showIcons' => ['code', 'table'], | ||
]; | ||
} |
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.