salted-herring / salted-library

Salted Herring's PHP library for SilverStripe
MIT License
1 stars 3 forks source link

Using Utilities::nl2p #2

Open simonwinter opened 6 years ago

simonwinter commented 6 years ago

https://github.com/salted-herring/salted-library/blob/e034e281d6e95d80a9453a3dca435a439472474f/code/Utilities.php#L315

When I use the Utilities nl2p function, I receive an error saying:

[User Error] Uncaught Error: Class 'SaltedHerring\ArrayList' not found

I've tried to use the function in a couple of ways:

use SaltedHerring\Utilities;
Utilities::nl2p(...)

or

SaltedHerring\Utilities::nl2p(...)

... but no dice. Am I doing something dumb here?

leochenftw commented 6 years ago

Oh, this nl2p was brought forward from the old utilities.php file The fix is easy - I will do it now

simonwinter commented 6 years ago

Hmmm,

Almost - just missing the Paragraph template:

None of the following templates could be found in theme "default": Paragraphs.ss

leochenftw commented 6 years ago

do I need to include the template in the library?

simonwinter commented 6 years ago

Yes, I think you should.