Esempio n. 1
0
 function getValidatorClass()
 {
     $class = Event::filter('validator::' . get_called_class(), $this->validator_class);
     if (!is_a($class, \Larakit\ValidateBuilder::class, true)) {
         return null;
     }
     return $class;
 }
Esempio n. 2
0
 function response($vars = [])
 {
     if (!isset($vars['base_url'])) {
         $vars['base_url'] = $this->base_url;
     }
     Event::notify('lk-page::before_layout');
     $layout = \View::make($this->getLayout(), $vars);
     Event::notify('lk-page::before_page', $layout);
     return \LaraPage::setContent($layout);
 }
Esempio n. 3
0
File: Page.php Progetto: larakit/lk
 public function pageDescriptionValues()
 {
     static $values;
     if (!isset($values)) {
         $values = Event::filter('lk-page::description', (array) trans('page.description'));
     }
     return $values;
 }
Esempio n. 4
0
                if ($size) {
                    $link->setAttribute('sizes', $size . 'x' . $size);
                }
                $parameters[] = $link;
            }
        }
    }
    return $parameters;
});
/**
 * Viewport
 */
\Larakit\Event\Event::listener('lk-page::meta-tags', function (sfEvent $e, $parameters) {
    $viewport = LaraPage::getViewport();
    if ($viewport) {
        $parameters[] = '<!-- Viewport -->';
        $parameters[] = HtmlMeta::setName('viewport')->setContent($viewport);
    }
    return $parameters;
});
/**
 * Generator
 */
\Larakit\Event\Event::listener('lk-page::meta-tags', function (sfEvent $e, $parameters) {
    $generator = LaraPage::getGenerator();
    if ($generator) {
        $parameters[] = '<!-- Generator -->';
        $parameters[] = HtmlMeta::setName('generator')->setContent($generator);
    }
    return $parameters;
});