小编pet*_*iar的帖子

git origin中不同大小写的重复文件(bitbucket)

我正在尝试将文件从foobar.php重命名为FooBar.php,这在Git中是一个相当大的挑战.到目前为止,我发现我不得不设立的混帐配置值ignorecase,以false(为什么它被设置为true,在Mac OS X,反正?).我已经设法在我的本地存储库中成功地重命名了这些文件,但在我将它推送到BitBucket之后我就得到了FooBar.php那么好foobar.php.我如何摆脱这些重复?谢谢.

git

34
推荐指数
3
解决办法
2万
查看次数

如何为Yii模块中的所有控制器设置布局?

在我的Yii应用程序中,我有一个名为admin的模块,因此模块类是AdminModule,它扩展了CWebModule类,位于AdminModule.php文件中.根据文档,CWebModule具有layout在所有模块控制器之间共享的属性,以防控制器本身没有定义任何布局.

我的控制器没有定义任何布局,在AdminModule.php我把它:

$this->layout='webroot.themes.bootstrap.views.layouts.column2';
$this->layoutPath = Yii::getPathOfAlias('webroot.themes.bootstrap.views.layouts');
Run Code Online (Sandbox Code Playgroud)

但是,管理模块中的控制器仍在使用其他布局,我认为它是在components目录中的Controller.php中定义的.这是为什么?如何为特定模块设置共享布局?

yii yii-modules

2
推荐指数
1
解决办法
5230
查看次数

如何在Drupal 8中获取多个值字段的值?

我在Drupal 8中有多个值图像字段,我想在Controller中准备值以在树枝模板中输出。

对于单个值字段,它很简单(好吧,如果我们可以称呼荒谬而又复杂的“让OOP尽其所能,尽管它毫无用处”, Drupal 8种方式都很简单):

$nids = \Drupal::entityQuery('node')->condition('type', 'zbornik_a_foto')->execute();
$nodes = Node::loadMultiple($nids);

$data = array();
foreach ($nodes as $node) {
  $data[] = array(
    'rocnik' => $node->get('field_rok')->getValue(),
    'miesto' => $node->get('field_miesto_konania')->getValue(),
    'fotografie' => $node->get('field_zbornik')->getValue(),
    'foto' => $node->get('field_fotografie')->getValue(),
  );
}

return array(
  '#theme' => 'riadky_zazili',
  '#data' => $data,
  '#title' => 'Zažili sme',
);
Run Code Online (Sandbox Code Playgroud)

但是,field_fotografie值是多个值字段,我想在$data数组中获取所有图像的URI 。有人知道吗?理想情况下,少于10行的无用的OOP跳线。谢谢。

drupal-8

2
推荐指数
1
解决办法
8433
查看次数

如何创建正确的 .lando.yml 自定义文件?

有什么方法可以创建一个正确的、真正自定义的 .lando.yml 文件,这样它就不会使用任何配方?如何在 Lando 中指定“只给我 Apache、MariaDB、PHP”?

我试过这个

    # The name of the app
    name: mariadb

    # Give me http://mariadb.lndo.site and https://mariadb.lndo.site
    proxy:
      html:
        - mariadb.lndo.site

    # Set up my services
   services:

  # Set up a basic webserver running the latest nginx with ssl turned on
  html:
    type: nginx
    ssl: true
    webroot: www

  # Spin up a mariadb container called "database"
  # NOTE: "database" is arbitrary, you could just as well call this "db" or "kanye"
  database:

    # Use mariadb version …
Run Code Online (Sandbox Code Playgroud)

docker lando

0
推荐指数
1
解决办法
2119
查看次数

标签 统计

docker ×1

drupal-8 ×1

git ×1

lando ×1

yii ×1

yii-modules ×1