Пример #1
0
 public function insert($fieldsCols = NULL)
 {
     $extractorConfig = Collection::find($this->provider);
     if (is_null($extractorConfig)) {
         throw new Exception('Не верный extractor');
     }
     $extractorClass = $extractorConfig['class'];
     /** @var \app\services\GetArticle\ExtractorInterface $extractor */
     $extractor = new $extractorClass($this->url);
     $articleObject = Chenneling::insertExtractorInterface($extractor);
     $articleObject->update(['tree_node_id_mask' => (new BitMask($this->tree_node_id_mask))->getMask()]);
     return true;
 }
Пример #2
0
echo Html::encode($this->title);
?>
</h1>
        <div class="btn-group">
            <a href="<?php 
echo Url::to(['admin/chenneling_list_add']);
?>
" class="btn btn-default">Добавить</a>
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
                    aria-expanded="false">
                <span class="caret"></span>
                <span class="sr-only">Toggle Dropdown</span>
            </button>
            <ul class="dropdown-menu" role="menu">
                <?php 
foreach (Collection::getList() as $item) {
    ?>
                    <li><a href="<?php 
    echo Url::to(['admin/chenneling_list_add_from_page', 'page' => $item['name']]);
    ?>
">Добавить
                            с <?php 
    echo $item['title'];
    ?>
</a></li>
                <?php 
}
?>
            </ul>
        </div>
        <?php