Shell.class.php 563 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. class Shell extends Readme {
  3. public static function manifest(){
  4. return array(
  5. 'uid' => 'shell',
  6. 'label' => 'Shell',
  7. 'description' => 'Script shell (linux, windows...)',
  8. 'fromExtension' => array('sh','bat'),
  9. 'toExtension' => 'sh'
  10. );
  11. }
  12. public static function toHtml($resource,$sketch){
  13. $infos = self::manifest();
  14. return array(
  15. 'content'=>'<textarea>'.$resource->content.'</textarea>',
  16. 'codemirror' => array(
  17. 'mode'=>'shell',
  18. 'theme'=>'monokai',
  19. 'lineNumbers' => true,
  20. 'readOnly' => false
  21. )
  22. );
  23. }
  24. }
  25. ?>