Skip to content

Commit cf07ff9

Browse files
committed
add asText override to title and text property
1 parent bba2098 commit cf07ff9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/Entities/Properties/Text.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ protected function fillText(): void
6969
$this->plainText = $this->content->getPlainText();
7070
}
7171

72+
/**
73+
* @return string
74+
*/
75+
public function asText(): string
76+
{
77+
return $this->getPlainText();
78+
}
79+
7280
/**
7381
* @return RichText
7482
*/

src/Entities/Properties/Title.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ private function fillText(): void
6868
$this->plainText = $this->content->getPlainText();
6969
}
7070

71+
/**
72+
* @return string
73+
*/
74+
public function asText(): string
75+
{
76+
return $this->getPlainText();
77+
}
78+
7179
/**
7280
* @return RichText
7381
*/

0 commit comments

Comments
 (0)