diff --git a/twigextensions/SeomaticTwigExtension.php b/twigextensions/SeomaticTwigExtension.php index bff49af..43d2224 100755 --- a/twigextensions/SeomaticTwigExtension.php +++ b/twigextensions/SeomaticTwigExtension.php @@ -56,6 +56,7 @@ public function getFilters() 'truncateStringOnWord' => new \Twig_Filter_Method($this, 'truncateStringOnWord'), 'encodeEmailAddress' => new \Twig_Filter_Method($this, 'encodeEmailAddress'), 'extractTextFromMatrix' => new \Twig_Filter_Method($this, 'extractTextFromMatrix'), + 'extractTextFromNeo' => new \Twig_Filter_Method($this, 'extractTextFromNeo'), 'getLocalizedUrls' => new \Twig_Filter_Method($this, 'getLocalizedUrls'), 'getFullyQualifiedUrl' => new \Twig_Filter_Method($this, 'getFullyQualifiedUrl'), ); @@ -74,6 +75,7 @@ public function getFunctions() 'truncateStringOnWord' => new \Twig_Function_Method($this, 'truncateStringOnWord'), 'encodeEmailAddress' => new \Twig_Function_Method($this, 'encodeEmailAddress'), 'extractTextFromMatrix' => new \Twig_Function_Method($this, 'extractTextFromMatrix'), + 'extractTextFromNeo' => new \Twig_Function_Method($this, 'extractTextFromNeo'), 'getLocalizedUrls' => new \Twig_Function_Method($this, 'getLocalizedUrls'), 'getFullyQualifiedUrl' => new \Twig_Function_Method($this, 'getFullyQualifiedUrl'), ); @@ -178,6 +180,17 @@ public function extractTextFromMatrix($matrixBlocks) return $result; } /* -- extractTextFromMatrix */ +/* -------------------------------------------------------------------------------- + Extract all of the text and rich text from the fields in NeoBlockModels +-------------------------------------------------------------------------------- */ + + public function extractTextFromNeo($neoBlocks) + { + $result = craft()->seomatic->extractTextFromNeo($neoBlocks); + + return $result; + } /* -- extractTextFromNeo */ + /* -------------------------------------------------------------------------------- Returns an array of localized URLs for the current request -------------------------------------------------------------------------------- */