Add includeCommand parameter to getAnyText method
This commit is contained in:
parent
6c6d7abb56
commit
b826d0d4dd
1 changed files with 3 additions and 2 deletions
|
@ -1026,11 +1026,12 @@
|
||||||
/**
|
/**
|
||||||
* Retrieves any available text, prioritizing 'text' over 'caption'.
|
* Retrieves any available text, prioritizing 'text' over 'caption'.
|
||||||
*
|
*
|
||||||
|
* @param bool $includeCommand
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getAnyText(): ?string
|
public function getAnyText(bool $includeCommand=false): ?string
|
||||||
{
|
{
|
||||||
return $this->text ?? $this->caption;
|
return $this->getText($includeCommand) ?? $this->getCaption($includeCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue