%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tjamichg/cursos.tjamich.gob.mx/app/Migrations/Schema/V110/
Upload File :
Create Path :
Current File : /home/tjamichg/cursos.tjamich.gob.mx/app/Migrations/Schema/V110/Version20150825141100.php

<?php
/* For licensing terms, see /license.txt */

namespace Application\Migrations\Schema\V110;

use Application\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

/**
 * Calendar color
 */
class Version20150825141100 extends AbstractMigrationChamilo
{
    /**
     * @param Schema $schema
     */
    public function up(Schema $schema)
    {
        $this->addSettingCurrent(
            'show_full_skill_name_on_skill_wheel',
            null,
            'radio',
            'Platform',
            'false',
            'ShowFullSkillNameOnSkillWheelTitle',
            'ShowFullSkillNameOnSkillWheelComment',
            null,
            null,
            1,
            false,
            true,
            [
                ['value' => 'true', 'text' => 'Yes'],
                ['value' => 'false', 'text' => 'No']
            ]
        );
    }

    /**
     * @param Schema $schema
     */
    public function down(Schema $schema)
    {
        $entityManage = $this->getEntityManager();

        $deleteOptions = $entityManage->createQueryBuilder();
        $deleteSettings = $entityManage->createQueryBuilder();

        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
            ->andWhere(
                $deleteOptions->expr()->in(
                    'o.variable',
                    ['show_full_skill_name_on_skill_wheel']
                )
            );
        $deleteOptions->getQuery()->execute();

        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
            ->andWhere(
                $deleteSettings->expr()->in(
                    's.variable',
                    ['show_full_skill_name_on_skill_wheel']
                )
            );
        $deleteSettings->getQuery()->execute();
    }
}

Zerion Mini Shell 1.0