/** * Parse social navigation * * @param AbstractController $controller * @param Application $application * @return void */ public static function parse(AbstractController $controller, Application $application) { if ($controller->hasView() && ($controller instanceof \Phire\Content\Controller\IndexController || $controller instanceof \Phire\Categories\Controller\IndexController)) { $body = $controller->response()->getBody(); if (strpos($body, '[{social_nav') !== false) { $social = new Model\Social(); $body = str_replace(['[{social_nav}]', '[{social_nav_styles}]'], [$social->buildNav(), $social->getStyles()], $body); $controller->response()->setBody($body); } } }