<?php namespace Orchestra\Story\Routing\Api;

use Illuminate\Routing\Controllers\Controller;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View;
use Orchestra\Story\Facades\StoryFormat;

abstract class EditorController extends Controller {

	/**
	 * Define filter for the controller.
	 *
	 * @access public
	 * @return void
	 */
	public function __construct()
	{
		$format = StoryFormat::get(Input::get('format'));

		$this->beforeFilter("orchestra.story.editor:{$format}");
		View::share('story_format', $format);
	}
}

<?php namespace Orchestra\Story\Routing\Api;

use Illuminate\Routing\Controllers\Controller;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Input;
use Orchestra\Support\Facades\Site;
use Orchestra\Story\Facades\StoryFormat;

abstract class EditorController extends Controller {

	/**
	 * Editor format.
	 *
	 * @var string
	 */
	protected $editorFormat;

	/**
	 * Define filter for the controller.
	 *
	 * @access public
	 * @return void
	 */
	public function __construct()
	{
		$format = StoryFormat::get(Input::get('format'));

		$this->beforeFilter("orchestra.story.editor:{$format}");
		$this->editorFormat = $format;
	}
}

Allow controller to hold editor format value.
Allow controller to hold editor format value.

Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
