public function indexAction() { $config = $this->getServiceLocator()->get('CKFinderModule\\Config'); $ckFinderPath = realpath($config['ckfinder_vendor_path']) . '/'; if (!file_exists($ckFinderPath . 'ckfinder.php')) { throw new \Exception('The ckfinder path "' . $ckFinderPath . '" does not seem to be valid'); } // Otherwise, we're going to need the CKFinder class require_once $ckFinderPath . 'ckfinder.php'; // You can use the "CKFinder" class to render CKFinder in a page: $finder = new \CKFinder(); // The path for the installation of CKFinder (default = "/ckfinder/"). $finder->BasePath = $config['ckfinder_basepath']; $finder->Width = $config['ckfinder_width']; $finder->Height = $config['ckfinder_height']; $finder->Create(); return $this->response; }
public static function CreateStatic($basePath = CKFINDER_DEFAULT_BASEPATH, $width = '100%', $height = 400, $selectFunction = null) { $finder = new CKFinder($basePath, $width, $height, $selectFunction); $finder->Create(); }
</h1> <div class="description"> CKFinder may be used in standalone mode inside any page, to create a repository manager with ease. You may define a custom JavaScript function to be called when an image is selected (double-clicked).</div> <p style="padding-left: 30px; padding-right: 30px;"> <?php require_once '../../ckfinder.php'; // You can use the "CKFinder" class to render CKFinder in a page: $finder = new CKFinder(); $finder->BasePath = '../../'; // The path for the installation of CKFinder (default = "/ckfinder/"). $finder->SelectFunction = 'ShowFileInfo'; // The default height is 400. $finder->Height = 600; $finder->Create(); // It can also be done in a single line, calling the "static" // Create( basePath, width, height, selectFunction ) function: // CKFinder::CreateStatic( '../../', null, null, 'ShowFileInfo' ) ; ?> </p> <div id="footer"> <hr /> <p> CKFinder - Ajax File Manager - <a class="samples" href="http://cksource.com/ckfinder/">http://cksource.com/ckfinder</a> </p> <p id="copy"> Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> </div> </body>
/** * Tests CKFinder->Create() */ public function testCreate() { // TODO Auto-generated CKFinderTest->testCreate() $this->markTestIncomplete("Create test not implemented"); $this->cKFinder->Create(); }