Scalr\Upgrade\Updates\Update20140825110000::run1 PHP Метод

run1() защищенный Метод

protected run1 ( $stage )
    protected function run1($stage)
    {
        if (!$this->hasTagRole()) {
            $this->console->out("Adding Role tag...");
            $tagRole = TagEntity::findPk(TagEntity::TAG_ID_ROLE) ?: new TagEntity();
            $tagRole->tagId = TagEntity::TAG_ID_ROLE;
            $tagRole->name = 'Role';
            $tagRole->save();
        }
        if (!$this->hasTagRoleBehavior()) {
            $this->console->out("Adding Role behavior tag...");
            $tagRoleBehavior = TagEntity::findPk(TagEntity::TAG_ID_ROLE_BEHAVIOR) ?: new TagEntity();
            $tagRoleBehavior->tagId = TagEntity::TAG_ID_ROLE_BEHAVIOR;
            $tagRoleBehavior->name = 'Role behavior';
            $tagRoleBehavior->save();
        }
        if (!$this->hasTagFarmOwner()) {
            $this->console->out("Adding Farm owner tag...");
            $tagFarmOwner = TagEntity::findPk(TagEntity::TAG_ID_FARM_OWNER) ?: new TagEntity();
            $tagFarmOwner->tagId = TagEntity::TAG_ID_FARM_OWNER;
            $tagFarmOwner->name = 'Farm owner';
            $tagFarmOwner->save();
        }
    }