symfony-3.1

    1熱度

    1回答

    我正在使用symfony 3.1進行開發。我使用symfony bundle生成器創建了一個新的bundle。並使用symfony控制檯應用程序創建了一個用戶實體。直到現在一切都很好。 當我創建使用教義爲用戶實體污物,它創建的所有結構,包括控制器,用戶類型,正確地,除了視圖爲用戶實體,用戶對視圖文件夾在默認的應用程序/資源/意見而不是CustomBundle創建/資源/視圖。 爲什麼會發生這種情況

    -2熱度

    3回答

    我有關係更新實體(一對多,多對一)的問題。我試圖在更新時向ArrayCollection添加一些新元素,但沒有做任何事情。 這是我創建並添加關係碼: $auctionPhoto = new AuctionPhoto(); $auctionPhoto->setAuction($auction); $auctionPhoto->setPath($path); $auction->getPhoto

    2熱度

    1回答

    我正在使用新的Symfony緩存組件。我第一次產生我的緩存的命令(指令/ AppCacheGenerateCommand.php): $cache = new FilesystemAdapter(); foreach ($domains as $domain){ if ($domain->getHost()){ $output->writeln('Generate

    1熱度

    1回答

    你好,我要達到我的login.php代碼..但我得到了首先重定向到/(家) error 我有一個控制器和我代碼 /** * @Route("/{champ}", name="home", defaults={"champ" = 1}) */ public function mainAction(Request $request,champion $champ)

    3熱度

    1回答

    我一直在使用的Symfony 3.1不工作與新的緩存組件(https://symfony.com/doc/current/components/cache.html),我使用Redis的適配器 config.yml cache: app: cache.adapter.redis default_redis_provider: "redis://127.0.0.1:6379"

    1熱度

    1回答

    做我得到的日期時間,並添加數據庫,我有形式類型構建像這樣的(包/表/ ClassType.php) $registered = date('Y-m-d'); $builder->add('registered', TextType::class, array( 'label' => 'registered', 'data' => $registered, )); 這裏

    1熱度

    1回答

    我想在symfony3中使用COM(組件對象模型,http://php.net/manual/en/intro.com.php)類。 namespace AppBundle\Lib; class Sfera { /** * Sfera constructor. */ public function __construct() { $

    0熱度

    1回答

    我正在使用Symfony3(和SonataAdminBundle一起),我需要創建一些驗證文件。由於我有幾個實體,我想將驗證的yml文件分成一個實體,我想使用依賴注入加載器來加載這些文件。現在,我有問題是: 如果我創建了我的驗證文件自定義的加載,我需要手動加載我services.yml和routing.yml中呢? 是否有任何明顯的問題與我的代碼,會導致以下錯誤? InvalidArgumentE

    0熱度

    1回答

    我試圖正確地加入symfony。我嘗試這裏描述Doctrine 2 - Outer join query和這裏Symfony - Using Outer Joins with Doctrine ORM。 $query = $em->getRepository('AppBundle:raports')->createQueryBuilder('r') ->select('r')

    -2熱度

    1回答

    我有一個奇怪的行爲重置密碼。我安裝在dev fosuser包上。我重寫登錄模板,它工作正常。但重置路線不正常。 我的配置: swiftmailer: transport: gmail username: [email protected] password: passowrd spool: { type: memory } fos_user: