You are here

class UbercartLineItem in Ubercart 8.4

Defines a line item plugin annotation object.

Hierarchy

Expanded class hierarchy of UbercartLineItem

1 file declares its use of UbercartLineItem
LineItemManager.php in uc_order/src/Plugin/LineItemManager.php
7 classes are annotated with UbercartLineItem
Generic in uc_order/src/Plugin/Ubercart/LineItem/Generic.php
Handles the generic line item.
Shipping in shipping/uc_quote/src/Plugin/Ubercart/LineItem/Shipping.php
Handles the subtotal line item.
Subtotal in uc_order/src/Plugin/Ubercart/LineItem/Subtotal.php
Handles the subtotal line item.
Tax in uc_tax/src/Plugin/Ubercart/LineItem/Tax.php
Handles the tax line item.
TaxDisplay in uc_tax/src/Plugin/Ubercart/LineItem/TaxDisplay.php
Handles the tax line item.

... See full list

File

uc_order/src/Annotation/UbercartLineItem.php, line 12

Namespace

Drupal\uc_order\Annotation
View source
class UbercartLineItem extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The title of the line item.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $title;

  /**
   * The plugin weight.
   *
   * @var int
   */
  public $weight;

  /**
   * Whether or not the line item will be stored in the database.
   *
   * Should be TRUE for any line item that is modifiable from the
   * order edit screen.
   *
   * @var bool
   */
  public $stored = FALSE;

  /**
   * Include this in the admin "Add a Line Item" selection.
   *
   * Whether or not a line item should be included in the "Add a Line Item"
   * select box on the order edit screen.
   *
   * @var bool
   */
  public $add_list = FALSE;

  /**
   * For inclusion into the order total.
   *
   * Whether or not the value of this line item should be added to the order
   * total. (Ex: would be TRUE for a shipping charge line item but FALSE for
   * the subtotal line item since the product prices are already taken into
   * account.)
   *
   * @var bool
   */
  public $calculated = FALSE;

  /**
   * For display only - this item is derived from other information.
   *
   * Whether or not this line item is simply a display of information but not
   * calculated anywhere. (Ex: the total line item uses display to simply show
   * the total of the order at the bottom of the list of line items.)
   *
   * @var bool
   */
  public $display_only = FALSE;

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
UbercartLineItem::$add_list public property Include this in the admin "Add a Line Item" selection.
UbercartLineItem::$calculated public property For inclusion into the order total.
UbercartLineItem::$display_only public property For display only - this item is derived from other information.
UbercartLineItem::$id public property The plugin ID.
UbercartLineItem::$stored public property Whether or not the line item will be stored in the database.
UbercartLineItem::$title public property The title of the line item.
UbercartLineItem::$weight public property The plugin weight.