Todaymade\Daux\Format\HTML\Config::getEditOn PHP Method

getEditOn() public method

public getEditOn ( )
    function getEditOn()
    {
        if (array_key_exists('edit_on', $this)) {
            if (is_string($this['edit_on'])) {
                return $this->prepareGithubUrl($this['edit_on']);
            } else {
                $this['edit_on']['basepath'] = rtrim($this['edit_on']['basepath'], '/');
                return $this['edit_on'];
            }
        }
        if (array_key_exists('edit_on_github', $this)) {
            return $this->prepareGithubUrl($this['edit_on_github']);
        }
        return null;
    }

Usage Example

Example #1
0
 /**
  * @dataProvider providerEditOn
  */
 public function testEditOn($value, $expected)
 {
     $config = new Config($value);
     $this->assertEquals($expected, $config->getEditOn());
 }