getPluginYamlData

The method $this->getPluginYamlData($filename) retrieves YAML formatted data from a file associated with the current plugin.

  • @param: (string) $filename. The name of the file to retrieve data from.
  • @return: (array|false) Returns an array containing the YAML data from the specified file if found, otherwise returns false.

Example Usage

<?php

namespace Plugins\Myplugin;

use \Typemill\Plugin;

class Myplugin extends Plugin
{
    ...

    public function myFunction()
    {
        $this->getPluginYamlData('mydata.yaml');
    }
}