Builds a few basic options.
546889
public function build()
    {
        $options = $this->suppliedOptions;

        //set the title if it doesn't exist
        $options['title'] = $this->validator->arrayGet($options, 'title', $options['field_name']);

        //run the visible property closure if supplied
        $visible = $this->validator->arrayGet($options, 'visible');

        if (is_callable($visible)) {
            $options['visible'] = $visible($this->config->getDataModel()) ? true : false;
        }

        //run the editable property's closure if supplied
        $editable = $this->validator->arrayGet($options, 'editable');

        if (isset($editable) && is_callable($editable)) {
            $options['editable'] = $editable($this->config->getDataModel());
        }

        $this->suppliedOptions = $options;
    }
1152773
def setup(app):
    """"""
    app.connect("builder-inited", build_configuration_parameters)
    app.connect("autodoc-skip-member", skip_slots)
    app.add_stylesheet("css/custom.css")
250451
def _build_default_options(self):
        "
        return [
            OptionDefault('model', None, inherit=True),
            OptionDefault('abstract', False, inherit=False),
            OptionDefault('strategy', enums.CREATE_STRATEGY, inherit=True),
            OptionDefault('inline_args', (), inherit=True),
            OptionDefault('exclude', (), inherit=True),
            OptionDefault('rename', {}, inherit=True),
        ]
294989
public function build()
    {
        parent::build();

        $options = $this->suppliedOptions;

        $model        = $this->config->getDataModel();
        $relationship = $model->{$options['field_name']}();
        $relatedModel = $relationship->getRelated();

        $options['table']       = $relationship->getTable();
        $options['column']      = $relationship->getQualifiedForeignPivotKeyName();
        $options['column2']     = $relationship->getQualifiedRelatedPivotKeyName();
        $options['foreign_key'] = $relatedModel->getKeyName();

        $this->suppliedOptions = $options;
    }
391391
protected function build()
    {
        $operation = $this->buildOperation('ListProfiles');

        $merchantID = $this->document->createElement('merchantID', $this->merchantId);
        $operation->appendChild($merchantID);

        if ($this->customerId) {
            $xmlMPayTid = $this->document->createElement('customerID', $this->customerId);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->expiredBy) {
            $xmlMPayTid = $this->document->createElement('expiredBy', $this->expiredBy);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->begin) {
            $xmlMPayTid = $this->document->createElement('begin', $this->begin);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->size) {
            $xmlMPayTid = $this->document->createElement('size', $this->size);
            $operation->appendChild($xmlMPayTid);
        }
    }
927467
public void build( OptionBuilder option, String... options )
    {
        for (String opt : options)
        {
            Matcher matcher = Pattern.compile( "(--[^\\s]*)(\\s(.+))?" ).matcher( opt );
            if (matcher.matches())
            {
                option.withLongForm( matcher.group( 1 ) );
                if (!StringUtil.isBlank( matcher.group( 3 ) )) option.wantsArgument( matcher.group( 3 ) );
                continue;
            }

            matcher = Pattern.compile( "(-.)(\\s+(.+))?" ).matcher( opt );
            if (matcher.matches())
            {
                option.withShortForm( matcher.group( 1 ) );
                if (!StringUtil.isBlank( matcher.group( 3 ) )) option.wantsArgument( matcher.group( 3 ) );
                continue;
            }

            option.withDescription( opt );
        }
    }
657724
protected function build()
    {
        $operation = $this->buildOperation('TransactionStatus');

        $merchantID = $this->document->createElement('merchantID', $this->merchantId);
        $operation->appendChild($merchantID);

        if ($this->mpayTid) {
            $xmlMPayTid = $this->document->createElement('mpayTID', $this->mpayTid);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->tid) {
            $xmlTid = $this->document->createElement('tid', $this->tid);
            $operation->appendChild($xmlTid);
        }
    }
590852
function build()
    {
        if (!$this->class) {
            $this->class = 'PUBLIC';
        }
        if (!$this->data['display_name']) {
            $this->data['display_name'] = $this->data['first_name'] . ' ' . $this->data['last_name'];
        }
        if (!$this->data['sort_string']) {
            $this->data['sort_string'] = $this->data['last_name'];
        }
        if (!$this->data['sort_string']) {
            $this->data['sort_string'] = $this->data['company'];
        }
        if (!$this->data['timezone']) {
            $this->data['timezone'] = date("O");
        }
        if (!$this->revisionDate) {
            $this->revisionDate = date('Y-m-d H:i:s');
        }

        $this->card = "BEGIN:VCARD\r\n";
        $this->card .= "VERSION:3.0\r\n";
        $this->card .= "CLASS:" . $this->class . "\r\n";
        $this->card .= "PRODID:-//class_vCard from WhatsAPI//NONSGML Version 1//EN\r\n";
        $this->card .= "REV:" . $this->revisionDate . "\r\n";
        $this->card .= "FN:" . $this->data['display_name'] . "\r\n";
        $this->card .= "N:"
            . $this->data['last_name'] . ";"
            . $this->data['first_name'] . ";"
            . $this->data['additional_name'] . ";"
            . $this->data['name_prefix'] . ";"
            . $this->data['name_suffix'] . "\r\n";
        if ($this->data['nickname']) {
            $this->card .= "NICKNAME:" . $this->data['nickname'] . "\r\n";
        }
        if ($this->data['title']) {
            $this->card .= "TITLE:" . $this->data['title'] . "\r\n";
        }
        if ($this->data['company']) {
            $this->card .= "ORG:" . $this->data['company'];
        }
        if ($this->data['department']) {
            $this->card .= ";" . $this->data['department'];
        }
        $this->card .= "\r\n";

        if ($this->data['work_po_box'] || $this->data['work_extended_address'] || $this->data['work_address'] || $this->data['work_city'] || $this->data['work_state'] || $this->data['work_postal_code'] || $this->data['work_country']) {
            $this->card .= "ADR;type=WORK:"
                . $this->data['work_po_box'] . ";"
                . $this->data['work_extended_address'] . ";"
                . $this->data['work_address'] . ";"
                . $this->data['work_city'] . ";"
                . $this->data['work_state'] . ";"
                . $this->data['work_postal_code'] . ";"
                . $this->data['work_country'] . "\r\n";
        }

        if ($this->data['home_po_box'] || $this->data['home_extended_address'] || $this->data['home_address'] || $this->data['home_city'] || $this->data['home_state'] || $this->data['home_postal_code'] || $this->data['home_country']) {
            $this->card .= "ADR;type=HOME:"
                . $this->data['home_po_box'] . ";"
                . $this->data['home_extended_address'] . ";"
                . $this->data['home_address'] . ";"
                . $this->data['home_city'] . ";"
                . $this->data['home_state'] . ";"
                . $this->data['home_postal_code'] . ";"
                . $this->data['home_country'] . "\r\n";
        }
        if ($this->data['email1']) {
            $this->card .= "EMAIL;type=INTERNET,pref:" . $this->data['email1'] . "\r\n";
        }
        if ($this->data['email2']) {
            $this->card .= "EMAIL;type=INTERNET:" . $this->data['email2'] . "\r\n";
        }
        if ($this->data['office_tel']) {
            $this->card .= "TEL;type=WORK,voice:" . $this->data['office_tel'] . "\r\n";
        }
        if ($this->data['home_tel']) {
            $this->card .= "TEL;type=HOME,voice:" . $this->data['home_tel'] . "\r\n";
        }
        if ($this->data['cell_tel']) {
            $this->card .= "TEL;type=CELL,voice:" . $this->data['cell_tel'] . "\r\n";
        }
        if ($this->data['fax_tel']) {
            $this->card .= "TEL;type=WORK,fax:" . $this->data['fax_tel'] . "\r\n";
        }
        if ($this->data['pager_tel']) {
            $this->card .= "TEL;type=WORK,pager:" . $this->data['pager_tel'] . "\r\n";
        }
        if ($this->data['url']) {
            $this->card .= "URL;type=WORK:" . $this->data['url'] . "\r\n";
        }
        if ($this->data['birthday']) {
            $this->card .= "BDAY:" . $this->data['birthday'] . "\r\n";
        }
        if ($this->data['role']) {
            $this->card .= "ROLE:" . $this->data['role'] . "\r\n";
        }
        if ($this->data['note']) {
            $this->card .= "NOTE:" . $this->data['note'] . "\r\n";
        }
        if ($this->data['photo']) {
            $this->card .= $this->generatePhotoData();
        }
        $this->card .= "TZ:" . $this->data['timezone'] . "\r\n";
        $this->card .= "END:VCARD\r\n";
    }
1009134
def build(self):
        """"""
        self.load_builtins()
        self.load_functions(self.tree)
        self.visit(self.tree)
1049164
protected function build()
    {
        $operation = $this->buildOperation('ManualCredit');

        $merchantID = $this->document->createElement('merchantID', $this->merchantId);
        $operation->appendChild($merchantID);

        $xmlMPayTid = $this->document->createElement('mpayTID', $this->mpayTid);
        $operation->appendChild($xmlMPayTid);

        if ($this->stateId) {
            $stateId = $this->document->createElement('stateID', $this->stateId);
            $operation->appendChild($stateId);
        }

        if ($this->amount) {
            $amount = $this->document->createElement('amount', $this->amount);
            $operation->appendChild($amount);
        }
    }
956272
public function build()
    {
        $tokenParsers = [];
        $executionStrategies = [];
        $functions = [];

        foreach ($this->extensions as $extension) {
            $tokenParsers = array_merge($tokenParsers, $extension->getTokenParsers());
            $executionStrategies = array_merge($executionStrategies, $extension->getExecutionStrategies());
            $functions = array_merge($functions, $extension->getFunctions());
        }

        $registry = new Registry($tokenParsers, [], [], '<{', '}>');

        $this->syntax = new Syntax(new Lexer(new TemplateLexer($registry)), new Parser(new TemplateParser($registry)));

        $this->executionStrategies = new ExecutionStrategyCollection($executionStrategies);

        $this->environment = new Environment($functions);

        $this->isLocked = true;
    }
195554
public function build() {

        // Add some extra settings that related processors are going to need
        $this->add_setting(new backup_activity_generic_setting(backup::VAR_COURSEID, base_setting::IS_INTEGER, $this->get_courseid()));
        $this->add_setting(new backup_activity_generic_setting(backup::VAR_CONTEXTID, base_setting::IS_INTEGER, $this->contextid));

        // Create the course directory
        $this->add_step(new create_taskbasepath_directory('create_course_directory'));

        // Create the course.xml file with course & category information
        // annotating some bits, tags and module restrictions
        $this->add_step(new backup_course_structure_step('course_info', 'course.xml'));

        // Generate the enrolment file (conditionally, prevent it in any IMPORT/HUB operation)
        if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
            $this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
        }

        // Annotate enrolment custom fields.
        $this->add_step(new backup_enrolments_execution_step('annotate_enrol_custom_fields'));

        // Annotate all the groups and groupings belonging to the course. This can be optional.
        if ($this->get_setting_value('groups')) {
            $this->add_step(new backup_annotate_course_groups_and_groupings('annotate_course_groups'));
        }

        // Annotate the groups used in already annotated groupings (note this may be
        // unnecessary now that we are annotating all the course groups and groupings in the
        // step above). This is here to support course->defaultgroupingid.
        // This may not be required to annotate if groups are not being backed up.
        if ($this->get_setting_value('groups')) {
            $this->add_step(new backup_annotate_groups_from_groupings('annotate_groups_from_groupings'));
        }

        // Annotate the question_categories belonging to the course context (conditionally).
        if ($this->get_setting_value('questionbank')) {
            $this->add_step(new backup_calculate_question_categories('course_question_categories'));
        }

        // Generate the roles file (optionally role assignments and always role overrides)
        $this->add_step(new backup_roles_structure_step('course_roles', 'roles.xml'));

        // Generate the filter file (conditionally)
        if ($this->get_setting_value('filters')) {
            $this->add_step(new backup_filters_structure_step('course_filters', 'filters.xml'));
        }

        // Generate the comments file (conditionally)
        if ($this->get_setting_value('comments')) {
            $this->add_step(new backup_comments_structure_step('course_comments', 'comments.xml'));
        }

        // Generate the calender events file (conditionally)
        if ($this->get_setting_value('calendarevents')) {
            $this->add_step(new backup_calendarevents_structure_step('course_calendar', 'calendar.xml'));
        }

        // Generate the logs file (conditionally)
        if ($this->get_setting_value('logs')) {
            // Legacy logs.
            $this->add_step(new backup_course_logs_structure_step('course_logs', 'logs.xml'));
            // New log stores.
            $this->add_step(new backup_course_logstores_structure_step('course_logstores', 'logstores.xml'));
        }

        // Generate the course competencies.
        $this->add_step(new backup_course_competencies_structure_step('course_competencies', 'competencies.xml'));

        // Annotate activity completion defaults.
        $this->add_step(new backup_completion_defaults_structure_step('course_completion_defaults', 'completiondefaults.xml'));

        // Generate the inforef file (must be after ALL steps gathering annotations of ANY type)
        $this->add_step(new backup_inforef_structure_step('course', 'inforef.xml'));

        // Migrate the already exported inforef entries to final ones
        $this->add_step(new move_inforef_annotations_to_final('migrate_inforef'));

        // At the end, mark it as built
        $this->built = true;
    }
1152113
public function build()
    {
        $this->startRow();

        foreach ($this->columns as $column) {
            $column->build();
        }

        $this->endRow();
    }
247678
def build(self, ignore=None):
        ''''''
        self._prepare_workspace()
        self.install_dependencies()
        self.package(ignore)
1281141
public function build()
    {
        $options = $this->suppliedOptions;

        //build the string or callable values for title and confirmation
        $this->buildStringOrCallable($options, array('confirmation', 'title'));

        //build the string or callable values for the messages
        $messages = $this->validator->arrayGet($options, 'messages', array());
        $this->buildStringOrCallable($messages, array('active', 'success', 'error'));
        $options['messages'] = $messages;

        //override the supplied options
        $this->suppliedOptions = $options;
    }
142125
public function build()
    {
        // Has this button an icon to add?
        if (isset($this->icon)) {
            $this->inner = $this->icon->build() . ' ' . $this->inner;
        }

        // Add button type css
        $this->css[] = 'btn-' . $this->option;

        // Do we have to add cs for a specific button size?
        if (isset($this->size)) {
            $this->css[] = 'btn-' . $this->size;
        }

        return parent::build();
    }
417802
public function build()
    {
        // first step is to set the icon name itself
        $this->css[] = 'fa-' . $this->icon;

        if (isset($this->on)) {
            $stack = $this->factory->create('Elements\Span');
            $stack->addCss('fa fa-stack');
            $this->addCss('fa-stack-1x');

            // Create the on icon
            $on = $this->factory->create('Fontawesome\Icon');
            $on->useIcon($this->on);
            $on->addCss([
                'fa-stack-2x',
                'icon_bg'
            ]);
            $icon_1 = $on->build();
        }

        // size set for icon?
        if (isset($this->size)) {

            if (isset($stack)) {
                $stack->addCss('fa-' . $this->size);
            }
            else {
                $this->addCss('fa-' . $this->size);
            }
        }

        // any floating wanted?
        if (isset($this->pull)) {

            if (isset($stack)) {
                $stack->addCss('fa-pull-' . $this->pull);
            }
            else {
                $this->addCss('fa-pull-' . $this->pull);
            }
        }

        // draw border?
        if ($this->border && !isset($stack)) {
            $this->css[] = 'fa-border';
        }

        // is muted?
        if ($this->muted) {

            if (isset($stack)) {
                $stack->addCss('fa-muted');
            }
            else {
                $this->css[] = 'fa-muted';
            }
        }

        // flip icon?
        if (isset($this->flip)) {

            if (isset($stack)) {
                $stack->addCss('fa-flip-' . $this->flip);
            }
            else {
                $this->css[] = 'fa-flip-' . $this->flip;
            }
        }

        // rotate icon?
        if (isset($this->rotation)) {
            if (isset($stack)) {
                $stack->addCss('fa-rotate-' . $this->rotation);
            }
            else {
                $this->css[] = 'fa-rotate-' . $this->rotation;
            }
        }

        // spin icon?
        if ($this->spin) {
            if (isset($stack)) {
                $stack->addCss('fa-spin');
            }
            else {
                $this->css[] = 'fa-spin';
            }
        }

        $icon_2 = parent::build();

        if (isset($stack)) {
            $stack->setInner($icon_1 . PHP_EOL . $icon_2);
            $html = $stack->build();
        }
        else {
            $html = $icon_2;
        }

        return $html;
    }