Last active
January 1, 2016 15:08
-
-
Save bangpound/8161941 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
namespace Bangpound\Bundle\DrupalBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
/** | |
* Class CtoolsContentTypesController | |
* @Route("/ctools") | |
* @package Bangpound\Bundle\DrupalBundle\Controller | |
*/ | |
class CtoolsContentTypesController extends Controller | |
{ | |
public function __construct() | |
{ | |
ctools_include('content'); | |
} | |
/** | |
* @Route("/{type}/{subtype}", name="ctools_content_render") | |
* @Method({"GET", "POST"}) | |
* @Template | |
* @param $type | |
* @param $subtype | |
* @param array $conf | |
* @param array $keywords | |
* @param array $args | |
* @param array $context | |
* @param string $incoming_content | |
* @return array | |
*/ | |
public function renderAction($type, $subtype, $conf = [], $keywords = array(), $args = array(), $context = array(), $incoming_content = '') | |
{ | |
$block = ctools_content_render($type, $subtype, $conf, $keywords, $args, $context, $incoming_content); | |
if ($block) { | |
return (array) $block; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment