You are here

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\Event
View 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

Namesort descending Modifiers Type Description Overrides
ProfileLabelEvent::$label protected property The label.
ProfileLabelEvent::$profile protected property The profile.
ProfileLabelEvent::getLabel public function Gets the profile label.
ProfileLabelEvent::getProfile public function Gets the profile.
ProfileLabelEvent::setLabel public function Sets the profile label.
ProfileLabelEvent::__construct public function Constructs a new ProfileLabelEvent object.