Creates a Terrific Skin

@param Skin $skin The skin to create
437284
public function createSkin(Skin $skin)
    {
        $module = new Module();
        $module->setName($skin->getModule());
        $module->addSkin($skin);

        $dst = $this->rootDir.'/../src/Terrific/Module/'.StringUtils::camelize($module->getName());

        if($this->toolbarMode === ToolbarListener::DEMO) {
            // prevent module creation in demo mode
            throw new \Exception('This action is not supported in demo mode');
        } else {
            if($this->moduleTemplate) {
                $this->copy($this->moduleTemplate, $dst, $module);
            }

            $this->copy($this->defaultTemplate, $dst, $module);
        }
    }
317866
function( skinName, skinDefinition )
		{
			loaded[ skinName ] = skinDefinition;

			skinDefinition.skinPath = paths[ skinName ]
				|| ( paths[ skinName ] =
						CKEDITOR.getUrl(
							'_source/' +	// @Packager.RemoveLine
							'skins/' + skinName + '/' ) );
		}
1309598
private function createCreateForm(Contract $entity)
    {
        $form = $this->createForm(new ContractType(), $entity, array(
            'action' => $this->generateUrl('ecommerce_contract_create'),
            'method' => 'POST',
        ));

//        $form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }
674791
public static function create($body, ?DescriptionFactory $descriptionFactory = null, ?Context $context = null): self
    {
        Assert::notNull($descriptionFactory);

        return new static($descriptionFactory->create($body, $context));
    }
915832
public function createAction(Asset $asset): void
    {
        if ($this->persistenceManager->isNewObject($asset)) {
            $this->assetRepository->add($asset);
        }
        $this->addFlashMessage('assetHasBeenAdded', '', Message::SEVERITY_OK, [htmlspecialchars($asset->getLabel())]);
        $this->redirect('index');
    }
72449
def create_install_template_skin(self):
        
        ckan_extension_template(self.name, self.target)
        self.install_package_develop('ckanext-' + self.name + 'theme')
1318362
public function setBody($body)
    {
        $node = $this->getBody(false);
        if(!$node){
            $node = $this->createElement('body');
            $this->doc->appendChild($node);
        }
        $node->nodeValue = htmlspecialchars($body);
    }
105271
public function setBody($body = '')
    {
        $this->body = $body;
        $this->debug->debug(__FUNCTION__, 'setBody: ', $this->body);
    }
535912
function( name )
	{
		var item	= this._.items[ name ],
			handler	= item && this._.handlers[ item.type ],
			command = item && item.command && this._.editor.getCommand( item.command );

		var result = handler && handler.create.apply( this, item.args );

		// Allow overrides from skin ui definitions..
		item && ( result = CKEDITOR.tools.extend( result, this._.editor.skin[ item.type ], true ) );

		// Add reference inside command object.
		if ( command )
			command.uiItems.push( result );

		return result;
	}
42317
public function make( $name ) {
		$this->name = ucfirst( camel_case( $name ) );
		$this->createController();
		$this->createContract();
		$this->createRequests();
	}
168908
public function create($index, $body = null)
    {
        $request = $this->createRequestInstance(self::INDEX_CREATE, $index, null);

        if (null !== $body) {
            $request->setBody($body);
        }

        return $this->client->send($request);
    }
913620
public static function create(array $attributes = [])
    {
        return tap(self::make(call_user_func_array([static::$client, 'create'], func_get_args())), function ($model) {
            $model->exists = true;
        });
    }
1228433
public function session_init()
    {
        parent::session_init();

        // set initial session vars
        if (!$_SESSION['user_id']) {
            $_SESSION['temp'] = true;
        }

        // restore skin selection after logout
        if ($_SESSION['temp'] && !empty($_SESSION['skin'])) {
            $this->config->set('skin', $_SESSION['skin']);
        }
    }
1349562
protected function initialize($color)
    {
        $colors = explode(',', $color);
        list($this->red, $this->green, $this->blue) = array_map('intval', $colors);
        $this->alpha = (double) $colors[3];
        $this->background = $this->defaultBackground();
    }
696284
public function createAction(Request $request)
    {
        if ($this->get('session')->has('module')) {
            // get the last module from the session to fill some defaults for the new one
            $tmpModule = $this->get('session')->get('module');

            // setup a fresh module object
            $module = new Module();
            $module->setStyle($tmpModule->getStyle());
        }
        else {
            // setup a fresh module object
            $module = new Module();

            // fill it with some defaults
            $module->setStyle('less');
        }

        // create form
        $form = $this->createForm(new ModuleType(), $module);

        if ($request->getMethod() == 'POST') {
            $form->bindRequest($request);

            if ($form->isValid()) {
                // set default templates
                $module->addTemplate(strtolower($module->getName()));

                // save the module in the session
                $this->get('session')->set('module', $module);

                // create the module in the filesystem
                try {
                    $moduleManager = $this->get('terrific.composer.module.manager');
                    $moduleManager->createModule($module);

                    $this->get('session')->setFlash('notice', 'Module ' . ucfirst($module->getName()) . ' created successfully');
                }
                catch (\Exception $e) {
                    $logger = $this->get('logger');
                    $logger->err($e->getMessage());

                    $this->get('session')->setFlash('notice', 'Module could not be created: ' . $e->getMessage());
                }

                if ($request->get('addskin', false)) {
                    // redirect to the add skin form
                    return $this->redirect($this->generateUrl('composer_add_skin'));
                }
                else {
                    // redirect to the create module form
                    return $this->redirect($this->generateUrl('composer_create_module'));
                }
            }
        }

        return array('form' => $form->createView());
    }
137730
public function addStyle($style) {
        $style = trim($style);
        if ($style != '') {
            if (strpos($this->style, $style) === false) {
                $this->style .= " 
                $style ";
            }
        }
    }
346516
function _createForeground(node) {
        this._foreground = {
            surface: new Surface({
                size: this.options.size,
                properties: {
                    backgroundColor: this.options.pullToRefreshBackgroundColor
                }
            }),
            mod: new Modifier({})
        };
        node.add(this._foreground.mod).add(this._foreground.surface);
    }