Various small improvements

pico-3.0-alpha
Daniel Rudolf 8 years ago
parent 882a80a179
commit 82a342ba44
No known key found for this signature in database
GPG Key ID: A061F02CD8DE4538
  1. 7
      lib/PicoTwigExtension.php
  2. 4
      plugins/DummyPlugin.php
  3. BIN
      themes/default/menu-icon.png

@ -93,13 +93,6 @@ class PicoTwigExtension extends Twig_Extension
*/ */
public function markdownFilter($markdown) public function markdownFilter($markdown)
{ {
if ($this->getPico()->getParsedown() === null) {
throw new LogicException(
'Unable to apply Twig "markdown" filter: '
. 'Parsedown instance wasn\'t registered yet'
);
}
return $this->getPico()->getParsedown()->text($markdown); return $this->getPico()->getParsedown()->text($markdown);
} }

@ -291,12 +291,12 @@ final class DummyPlugin extends AbstractPicoPlugin
* *
* @see Pico::getTwig() * @see Pico::getTwig()
* @see DummyPlugin::onPageRendered() * @see DummyPlugin::onPageRendered()
* @param Twig_Environment &$twig twig template engine * @param Twig_Environment $twig twig template engine
* @param array &$twigVariables template variables * @param array &$twigVariables template variables
* @param string &$templateName file name of the template * @param string &$templateName file name of the template
* @return void * @return void
*/ */
public function onPageRendering(Twig_Environment &$twig, array &$twigVariables, &$templateName) public function onPageRendering(Twig_Environment $twig, array &$twigVariables, &$templateName)
{ {
// your code // your code
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Loading…
Cancel
Save