Questions tagged [nette]

Nette Framework is an open source tool for PHP web development. Nette focuses on security and performance and it's one of the safest PHP frameworks.

Nette Framework is an MVC framework developed by David Grudl. It is designed to be as easy as possible to use and it is one of the safest frameworks.

Latte is used as a primary templating engine which has features such as macros, filters, context-aware output escaping, localization support or custom blocks.

Nette offers an easy to use service container, allowing to register singleton or factory created services. The service container also supports Dependency Injection with automatic (can be disabled) injection of services into constructors of other services or controllers.

Current Nette version: 2.4

Resources

142 questions
19
votes
5 answers

Composer - extension iconv is missing

I'm running Manjaro linux and I have installed apache 2.4.10-1 with php 5.5.15-1 and php-composer 1.0.0.alpha8.458-1. I want to download project with composer by this command composer create-project nette/sandbox TaskManager but I'm getting error…
Tanadche
  • 421
  • 1
  • 3
  • 9
8
votes
1 answer

Nette Framework - custom attribute macros

What is the best way to define new attribute macros in the Nette Framework? Moreover, would it be possible to do so in the config file?
Mikulas Dite
  • 7,790
  • 9
  • 59
  • 99
8
votes
4 answers

How to register filters (formerly helpers) in Latte?

I would like to create my own filter for Latte templating engine. There is an example in their documentation but it doesn't describe how to register it inside presenter. $latte = new Latte\Engine; $latte->addFilter('myFilter', function ($s) { …
Northys
  • 1,305
  • 3
  • 16
  • 32
7
votes
1 answer

How to ignore some files in release with GIT

I develop a core for our Nette web projects. The core is injected as a library. Although I want to be able to test and try the functionalities of the core project without injecting it. So I had to add files needed to start the core project…
Martin Pohorský
  • 431
  • 3
  • 15
6
votes
2 answers

How to get values from neon file in Nette?

I have small application based on Nette framework. I've created constants.neon file and add it to container. There will be some data which should be available from presenters, models, forms etc. How can I access to values in constants.neon? I know…
tsg
  • 465
  • 5
  • 16
6
votes
2 answers

Cannot read property 'indexOf' of undefined

i'm trying to set different options for several datepickers in jquery. My code is looks like this: {foreach $cart->getItems() as $item} {if $item->action->prereservation} var disableDates = new Array(); {if…
Lukeluha
  • 253
  • 2
  • 5
  • 11
5
votes
2 answers

Escaped HTML in summernote

I am using wysiwyg called summernote which values I send to server, where I purify it with HTML Purifier. After that I save it to the DB (mysql). I then need to show purified html back in the wysiwyg, so write it as a textarea value (the textarea is…
Kudlas
  • 659
  • 7
  • 24
5
votes
3 answers

PHP (Nette framework) automatic coding standards check

I would like to have some type of automatic checking of coding standards for PHP Nette Framework is there anything like this? Standalone application or plugin for Eclipse, Netbeans ... For example to check Java code I use Checkstyle. Or can…
Amsik
  • 698
  • 2
  • 6
  • 26
4
votes
1 answer

Nette getUser in component

I have to ask how to get name of logged user into Nette component (SomethingControl.php). Apparently I can't just do this: $identity = $this->getUser()->getIdentity(); if ($identity) $this->template->username = $identity->getData()['username']; So…
Muhaha
  • 61
  • 5
4
votes
2 answers

How to debug Latte templates on PhpStorm?

Is it possible to debug Latte templates in PhpStorm in the same manner as one would debug plain PHP? The documentation says: If you are using an IDE with code stepping you can go through the generated PHP code of the template. How to do this on…
masa
  • 2,762
  • 3
  • 21
  • 32
3
votes
1 answer

Doctrine: How to order by attribute from association with Criteria

I am not able to order records by attribute from another entity. I have class Employee, which has attribute $user, which points to class User, which have attribute $active. Now I want to sort Employee by user.active and I am not able to do that.…
Martin Pohorský
  • 431
  • 3
  • 15
3
votes
1 answer

WIll this nette routing rule potentially redirect all url requests to homepage?

I am in argument as junior with a senior dev that says my routing is wrong and dangerous, that potentially all request could be routed to homepege, but I think he is wrong and I even tested it. He says that by adding this $this->router[] = new…
The Law
  • 344
  • 3
  • 20
3
votes
1 answer

ublaboo datagridd get id from latte to presenter

I use datagrid Ublaboo\Datagrid on my Nette project. This DataGrid is super, but I have one problem with get ID from component to presenter. I have show.latte, that get ID to renderShow method in presenter public function renderShow($id = null)…
ondrusu
  • 97
  • 4
3
votes
1 answer

DataTables and Nette; Refreshing snippet removes Datatables elements

I have problem with DataTables working alongside Nette. My JavaScript code: $(document).ready(function(){ $('.table').DataTables(); }); HTML Nette: {snippet customers} …
ondrusu
  • 97
  • 4
3
votes
1 answer

Doctrine 2 how to properly map multi-level inheritance

I have multi-level inheritance doctrine entity like this: /** * @ORM\Entity * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="type", type="string") * @ORM\DiscriminatorMap({"customer" = "CustomerUser", * "admin" = "AdminUser",…
amik
  • 5,613
  • 3
  • 37
  • 62
1
2 3
9 10