class ProfileLabelEvent in Profile 8
Defines the profile label event.
Hierarchy
- class \Drupal\profile\Event\ProfileLabelEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ProfileLabelEvent
See also
\Drupal\address\Event\AddressEvents
1 file declares its use of ProfileLabelEvent
- Profile.php in src/
Entity/ Profile.php
File
- src/
Event/ ProfileLabelEvent.php, line 13
Namespace
Drupal\profile\EventView source
class ProfileLabelEvent extends Event {
/**
* The profile.
*
* @var \Drupal\profile\Entity\ProfileInterface
*/
protected $profile;
/**
* The label.
*
* @var string
*/
protected $label;
/**
* Constructs a new ProfileLabelEvent object.
*
* @param \Drupal\profile\Entity\ProfileInterface $profile
* The profile.
* @param string $label
* The profile label.
*/
public function __construct(ProfileInterface $profile, $label) {
$this->profile = $profile;
$this->label = $label;
}
/**
* Gets the profile.
*
* @return \Drupal\profile\Entity\ProfileInterface
* The profile.
*/
public function getProfile() {
return $this->profile;
}
/**
* Gets the profile label.
*
* @return string
* The profile label.
*/
public function getLabel() {
return $this->label;
}
/**
* Sets the profile label.
*
* @param string $label
* The profile label.
*
* @return $this
*/
public function setLabel($label) {
$this->label = $label;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ProfileLabelEvent:: |
protected | property | The label. | |
ProfileLabelEvent:: |
protected | property | The profile. | |
ProfileLabelEvent:: |
public | function | Gets the profile label. | |
ProfileLabelEvent:: |
public | function | Gets the profile. | |
ProfileLabelEvent:: |
public | function | Sets the profile label. | |
ProfileLabelEvent:: |
public | function | Constructs a new ProfileLabelEvent object. |