Webmozart\Console\UI\Component\LabeledParagraph::isAligned PHP Method

isAligned() public method

Returns whether the paragraph is aligned with other paragraphs in its alignment.
public isAligned ( ) : boolean
return boolean Returns `true` if the paragraph should be aligned with the other paragraphs in the alignment and `false` otherwise.
    public function isAligned()
    {
        return $this->aligned;
    }

Usage Example

Esempio n. 1
0
 /**
  * Adds a labeled paragraph to the alignment.
  *
  * @param LabeledParagraph $paragraph   The labeled paragraph.
  * @param int              $indentation The indentation of the paragraph.
  */
 public function add(LabeledParagraph $paragraph, $indentation = 0)
 {
     if ($paragraph->isAligned()) {
         $this->paragraphs[] = $paragraph;
         $this->indentations[] = $indentation;
     }
 }