示例#1
0
 /**
  * @return Stage
  */
 public function frontendPlatform()
 {
     $Stage = new Stage('Test', 'Frontend');
     $Stage->setMessage('Message: Red alert.Processor of a distant x-ray vision, lower the death!Make it so, chemical wind!Fantastic nanomachines, to the alpha quadrant.Boldly sonic showers lead to the understanding.The death is a ship-wide cosmonaut.Wobble nosily like a post-apocalyptic space suit.Cosmonauts are the emitters of the fantastic ionic cannon.Where is the strange teleporter?');
     $Stage->addButton(new Standard('Link', new Route(__NAMESPACE__)));
     $Stage->setContent((new Form(new FormGroup(array(new FormRow(array(new FormColumn(new AutoCompleter('AutoCompleter', 'AutoCompleter', 'AutoCompleter', array('123', '234', '345')), 3), new FormColumn(array(new CheckBox('CheckBox', 'CheckBox', 'c1'), new RadioBox('RadioBox1', 'RadioBox1a', '1a')), 3), new FormColumn(new DatePicker('DatePicker', 'DatePicker', 'DatePicker'), 3), new FormColumn(new FileUpload('FileUpload', 'FileUpload', 'FileUpload'), 3))), new FormRow(array(new FormColumn(new HiddenField('HiddenField', 'HiddenField', 'HiddenField'), 3), new FormColumn(new NumberField('NumberField', 'NumberField', 'NumberField'), 3), new FormColumn(new PasswordField('PasswordField', 'PasswordField', 'PasswordField'), 3), new FormColumn(array(new RadioBox('RadioBox1', 'RadioBox1b', '1b'), new RadioBox('RadioBox2', 'RadioBox2', '2'), new RadioBox('RadioBox3', 'RadioBox3', '3')), 3))), new FormRow(array(new FormColumn(new SelectBox('SelectBox', 'SelectBox', array('0' => 'A', '2' => '1', '3' => '2', '4' => '3')), 3), new FormColumn(new TextArea('TextArea', 'TextArea', 'TextArea'), 3), new FormColumn(new TextCaptcha('TextCaptcha', 'TextCaptcha', 'TextCaptcha'), 3), new FormColumn(new TextField('TextField', 'TextField', 'TextField'), 3)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Form-Title')), array(new Primary('Primary'), new Danger('Danger'), new Success('Success'), new Reset('Reset'))))->setConfirm('Wirklich?') . new Layout(array(new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(new Badge('Badge')), 3), new LayoutColumn(array(new Container('Container')), 3), new LayoutColumn(array(new Header('Header')), 3))), new LayoutRow(array(new LayoutColumn(array(new Label('Label')), 3), new LayoutColumn(array(new Listing('Listing')), 3), new LayoutColumn(array(new Panel('Panel', array('Conten 1', 'Content 2', 'Content 3'), Panel::PANEL_TYPE_DEFAULT, 'Footer')), 3), new LayoutColumn(array(new PullRight('PullRight')), 3))), new LayoutRow(array(new LayoutColumn(array(new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/logo_kreide2.png'), 'Title', 'Description', array(new \SPHERE\Common\Frontend\Link\Repository\Primary('Primary', '')))), 3), new LayoutColumn(array(new Well('Well', array())), 3), new LayoutColumn(new TableData(array(array('A' => 1, 'B' => '2'), array('A' => 2, 'B' => '34567890'))), 6))), new LayoutRow(array(new LayoutColumn(array('<hr/>'))))), new Title('Layout-Title')), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(new LayoutTabs(array(new LayoutTab('Name1', 0), new LayoutTab('Name2', 1), new LayoutTab('Name3', 2))), 3)))), new Title('Layout Development')))));
     return $Stage;
 }
示例#2
0
 public static function registerApplication()
 {
     Datev::registerModule();
     Main::getDisplay()->addApplicationNavigation(new Link(new Link\Route(__NAMESPACE__), new Link\Name('Daten exportieren')));
     Main::getDispatcher()->registerRoute(Main::getDispatcher()->createRoute(__NAMESPACE__, __CLASS__ . '::frontendDashboard'));
     Main::getDispatcher()->registerWidget('Export', new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/datev_logo.png'), 'Datev', 'Rechnungen', new Standard('', '/Sphere/Transfer/Export/Datev', new Download(), array(), 'Download')), 2, 4);
     Main::getDispatcher()->registerWidget('Transfer', new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/datev_logo.png'), 'Datev', 'Rechnungen', new Standard('', '/Sphere/Transfer/Export/Datev', new Download(), array(), 'Download')), 2, 4);
 }
示例#3
0
 public static function registerApplication()
 {
     FuxSchool::registerModule();
     Main::getDisplay()->addApplicationNavigation(new Link(new Link\Route(__NAMESPACE__), new Link\Name('Daten importieren')));
     Main::getDispatcher()->registerRoute(Main::getDispatcher()->createRoute(__NAMESPACE__, __CLASS__ . '::frontendDashboard'));
     Main::getDispatcher()->registerWidget('Import', new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/fuxschool.gif'), 'FuxSchool', 'Schülerdaten', new Standard('', '/Sphere/Transfer/Import/FuxSchool/Student', new Upload(), array(), 'Upload')), 2, 2);
     Main::getDispatcher()->registerWidget('Transfer', new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/fuxschool.gif'), 'FuxSchool', 'Schülerdaten', new Standard('', '/Sphere/Transfer/Import/FuxSchool/Student', new Upload(), array(), 'Upload')), 2, 2);
     Main::getDispatcher()->registerWidget('Import', new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/fuxschool.gif'), 'FuxSchool', 'Klassendaten', new Standard('', '/Sphere/Transfer/Import/FuxSchool/Division', new Upload(), array(), 'Upload')), 2, 2);
     Main::getDispatcher()->registerWidget('Transfer', new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/fuxschool.gif'), 'FuxSchool', 'Klassendaten', new Standard('', '/Sphere/Transfer/Import/FuxSchool/Division', new Upload(), array(), 'Upload')), 2, 2);
 }
 public function testStaticFileLoader()
 {
     try {
         FileSystem::getFileLoader(__DIR__);
     } catch (\Exception $E) {
         $this->assertInstanceOf('MOC\\V\\Core\\FileSystem\\Component\\Exception\\Repository\\TypeFileException', $E);
     }
     try {
         FileSystem::getFileLoader(__FILE__);
     } catch (\Exception $E) {
     }
 }
示例#5
0
 /**
  * @param string                $Project
  * @param string                $Title
  * @param DirectoryParameter    $Source
  * @param DirectoryParameter    $Destination
  * @param null|ExcludeParameter $Exclude
  */
 public function __construct($Project, $Title, DirectoryParameter $Source, DirectoryParameter $Destination, ExcludeParameter $Exclude = null)
 {
     AutoLoader::getNamespaceAutoLoader('ApiGen', __DIR__ . '/../../../Vendor/ApiGen');
     AutoLoader::getNamespaceAutoLoader('TokenReflection', __DIR__ . '/../../../Vendor/ApiGen/libs/TokenReflection');
     AutoLoader::getNamespaceAutoLoader('FSHL', __DIR__ . '/../../../Vendor/ApiGen/libs/FSHL');
     $this->Project = $Project;
     $this->Title = $Title;
     $this->Source = $Source;
     $this->Destination = $Destination;
     $this->Exclude = $Exclude;
     set_time_limit(0);
     $Config = $this->getConfig();
     require_once __DIR__ . '/../../../Vendor/ApiGen/libs/Nette/Nette/loader.php';
     $Neon = new NeonAdapter();
     $File = FileSystem::getFileWriter(__DIR__ . '/ApiGen.config');
     file_put_contents($File->getLocation(), $Neon->dump($Config));
     $_SERVER['argv'] = array('DUMMY-SHELL-ARGS', '--config', $File->getLocation());
     include __DIR__ . '/../../../Vendor/ApiGen/apigen.php';
 }
示例#6
0
 public function __construct(File $Source, File $Splash = null)
 {
     if ($Location = $Source->getRealPath()) {
         $FileInfo = new \finfo(FILEINFO_MIME_TYPE);
         $MimeType = $FileInfo->buffer(file_get_contents($Location));
     } else {
         $MimeType = '';
     }
     $this->Template = $this->getTemplate(__DIR__ . '/Video.twig');
     $this->Template->setVariable('MimeType', $MimeType);
     $this->Template->setVariable('Source', $Source->getLocation());
     array_push($this->Source, $Source->getLocation());
     if ($Splash !== null && $Splash->getRealPath()) {
         $this->Template->setVariable('Splash', $Splash->getLocation());
     } else {
         $Splash = FileSystem::getFileLoader('Common/Style/Resource/Logo/kuw_logo2.png');
         $this->Template->setVariable('Splash', $Splash->getLocation());
     }
     $this->Template->setVariable('Splash', $Splash->getLocation());
 }
 /**
  * @param IBridgeInterface $File
  * @param string           $Title
  * @param string           $Description
  * @param array            $ButtonList
  * @param string           $Type THUMBNAIL_TYPE_DEFAULT
  */
 public function __construct(IBridgeInterface $File, $Title, $Description = '', $ButtonList = array(), $Type = self::THUMBNAIL_TYPE_DEFAULT)
 {
     if (!is_array($ButtonList)) {
         $ButtonList = array($ButtonList);
     }
     $this->Template = $this->getTemplate(__DIR__ . '/Thumbnail.twig');
     if ($File->getRealPath()) {
         $this->Template->setVariable('File', $File->getLocation());
         $Size = getimagesize($File->getRealPath());
         $this->Template->setVariable('Height', $Size[1]);
     } else {
         $File = FileSystem::getFileLoader('Common/Style/Resource/logo_kreide2.png');
         $this->Template->setVariable('File', $File->getLocation());
         $Size = getimagesize($File->getRealPath());
         $this->Template->setVariable('Height', $Size[1]);
     }
     $this->Template->setVariable('Type', $Type);
     $this->Template->setVariable('Title', $Title);
     $this->Template->setVariable('Description', $Description);
     $this->Template->setVariable('ButtonList', $ButtonList);
     $this->File = $File;
 }
示例#8
0
//$Less->parse( '@breadcrumb-color: @link-color;' );
//$Less->parse( '@breadcrumb-active-color: @link-hover-color;' );
//$Less->parse( '@breadcrumb-padding-vertical: 2px;' );
//$Less->parse( '@breadcrumb-padding-horizontal: 0;' );
//
//$Less->parse( '@table-cell-padding: 6px;' );
//$Less->parse( '@table-condensed-cell-padding: 5px;' );
// Panel
$Less->parse('@panel-heading-padding: 7px 10px;');
$Less->parse('@panel-body-padding: 5px 10px;');
// Thumbnail
$Less->parse('@thumbnail-padding: 6px;');
$Less->parse('@thumbnail-caption-padding: 9px;');
//$Less->parse( '@thumbnail-border: @gray-dark;' );
//$Less->parse( '@thumbnail-border-radius: 0;' );
// Component
$Less->parse('@padding-base-vertical: 4px;');
$Less->parse('@padding-base-horizontal: 10px;');
$Less->parse('@padding-large-vertical: 8px;');
$Less->parse('@padding-large-horizontal: 14px;');
$Less->parse('@padding-small-vertical: 3px;');
$Less->parse('@padding-small-horizontal: 8px;');
$Less->parse('@padding-xs-vertical: 1px;');
$Less->parse('@padding-xs-horizontal: 3px;');
$Less->parse('@border-radius-base: 3px;');
$Less->parse('@border-radius-large: 5px;');
$Less->parse('@border-radius-small: 2px;');
$Less->parse('@form-group-margin-bottom: 10px;');
$Style = FileSystem::getFileWriter(__DIR__ . '/Bootstrap.css')->getLocation();
file_put_contents($Style, $Less->getCss());
(new Extension())->getDebugger()->screenDump($Less->AllParsedFiles());
 /**
  * @param string $Location
  *
  * @return IBridgeInterface
  */
 public static function getUniversalFileWriter($Location)
 {
     $Loader = new FileSystem(new Vendor(new UniversalFileWriter(new FileParameter($Location))));
     return $Loader->getBridgeInterface();
 }