Retrieves a share button provider from collection by its label.

@param string $label

@return \EzSystems\ShareButtonsBundle\SocialShare\ProviderInterface

@throws \InvalidArgumentException
971776
public function getProvider($label)
    {
        if (!isset($this->providers[$label])) {
            throw new InvalidArgumentException(sprintf('Unknown share button provider `%s`', $label));
        }

        return $this->providers[$label];
    }
833416
protected function getFieldRow($label)
    {
        return function($row) use($label) {
            if (is_null($row->value)) {
                return '---';
            }
            $value = array_get($row->value, $label);
            $class = ($value) ? 'success' : 'danger';
            $label = ($value) ? 'yes' : 'no';
            return '<span class = "label-basic label-basic--' . $class . '">' . trans('antares/foundation::messages.' . $label) . '</span >';
        };
    }
670923
public function setLabel($label)
    {
        if (!empty($label) && is_string($label) && ctype_print($label)) {
            $this->label = trim($label);
        }

        return $this;
    }
215019
public static function label($label, $id = null, array $attributes = array())
	{
		return static::$instance->label($label, $id, $attributes);
	}
961941
function setLabel($label)
    {
        // normalize header label
        $label = str_replace(' ', '-', ucwords(str_replace(['_', '-'], ' ', (string) $label)));

        if (! isValidLabel($label) )
            throw new \InvalidArgumentException(sprintf(
                'Invalid header name "%s".'
                , is_null($label) ? 'null' : $label
            ));


        $this->label = $label;
        return $this;
    }
595648
public static function escape($label) {
        if (empty(self::$escaper)) {
            self::$escaper = new \Behat\Mink\Selector\Xpath\Escaper();
        }
        return self::$escaper->escapeLiteral($label);
    }
1246850
public function endWith($label = '')
    {
        $label = $label ?: 'End with';

        $condition = [$this->column, 'like', "%{$this->value}"];

        return $this->joinGroup($label, $condition);
    }
700071
public function key($name, $label = null)
    {
        $this->lastKey = $name;

        // Rest previous key's last rule
        $this->lastRule = null;

        if (!isset($this->options['rules'][$name])) {
            $this->options['rules'][$name] = [];
        }

        if (isset($label)) {
            $this->label($label);
        }

        return $this;
    }
611650
public function setLabel($label)
        {
            if (null !== $label && !is_string($label)) {
                throw new Exception(
                        'Invalid argument: $label must be a string or null');
            }

            $this->_label = $label;
            return $this;
        }
637375
public function getProvider($name)
    {
        if (!$name) {
            throw new \InvalidArgumentException('Provider name cannot be empty, did you forget to call setProviderName() in your Media object?');
        }
        if (empty($this->providers)) {
            throw new \RuntimeException(sprintf('Unable to retrieve provider named "%s" since there are no providers configured yet.', $name));
        }
        if (!isset($this->providers[$name])) {
            throw new \InvalidArgumentException(sprintf('Unable to retrieve the provider named "%s". Available providers are %s.', $name, '"'.implode('", "', $this->getProviderList()).'"'));
        }

        return $this->providers[$name];
    }
1083398
public function dropIfExists($label)
    {
        $blueprint = $this->createBlueprint($label);

        $blueprint->dropIfExists();

        return $this->build($blueprint);
    }
1132307
public function get_cached_file($label)
    {
        $filename = $this->cache_path . $this->safe_filename($label) . $this->cache_extension;

        if(file_exists($filename))
            return file_get_contents($filename);

        return false;
    }
1258186
public function getSingleNodeByLabel($label)
    {
        foreach ($this->nodes as $node) {
            if ($node->hasLabel($label)) {
                return $node;
            }
        }

        return;
    }
701452
public function createButton($label, array $attributes = [])
    {
        $button = new Components\Form\Elements\Button($label);

        if ( ! array_key_exists('class', $attributes)) {
            $button->attributes->addAttributeClass(['btn', 'my-2', 'my-sm-0']);
        }

        if (count($attributes)) {
            foreach ($attributes as $name => $value) {
                $button->attributes->addAttribute($name, $value);
            }
        }

        $this->childNodes->push($button);

        return $this->childNodes->last();
    }
1154897
public function labels($labels = null)
    {
        if ($labels === null)
        {
            return $this->_labels;
        }

        $this->_labels = $labels;
        return $this;
    }
353610
public function addAgendaSetupMenu($label)
    {
        $setup = $this->addContainer($label);

        $setup->addAgendaSetupPage($this->_('Activities'),          'pr.agenda-activity',  'agenda-activity');
        $setup->addAgendaSetupPage($this->_('Procedures'),          'pr.agenda-procedure', 'agenda-procedure');
        $setup->addAgendaSetupPage($this->_('Diagnoses'),           'pr.agenda-diagnosis', 'agenda-diagnosis');
        $setup->addAgendaSetupPage($this->_('Locations'),           'pr.locations',        'location');
        $setup->addAgendaSetupPage($this->_('Healthcare staff'),    'pr.agenda-staff',     'agenda-staff');
        $setup->addBrowsePage(     $this->_('Track field filters'), 'pr.agenda-filters',   'agenda-filter');

        return $setup;
    }
42554
public function createGroup($label)
    {
        $group = new Select\Group();
        $group->textContent->push($label);

        $this->childNodes->push($group);

        return $this->childNodes->last();
    }