Programming Language PHP

Namespace Oro\Bundle\SalesBundle\Migrations\Schema\v1_22

Class AddOpportunityStatus

Method/Function addStatusField

Total Examples 1

1 code examples of PHP Oro\Bundle\SalesBundle\Migrations\Schema\v1_22\AddOpportunityStatus::addStatusField extracted from open source projects

Was this example useful?
0
                                                    /**
     * Add opportunity status Enum field and initialize default enum values
     */
    protected function addOpportunityStatusField(Schema $schema, QueryBag $queries)
    {
        $immutableCodes = ['in_progress', 'won', 'lost'];

        AddOpportunityStatus::addStatusField($schema, $this->extendExtension, $immutableCodes);

        $statuses = [
            'in_progress' => 'Open',
            'identification_alignment' => 'Identification & Alignment',
            'needs_analysis' => 'Needs Analysis',
            'solution_development' => 'Solution Development',
            'negotiation' => 'Negotiation',
            'won' => 'Closed Won',
            'lost' => 'Closed Lost',
        ];

        AddOpportunityStatus::addEnumValues($queries, $statuses);
    }
                                            
AddOpportunityStatus's Other Methods