Yes, using an AdminController can prevent duplicate code. My backend
controllers would almost always have at least index, add, edit
and delete methods. Those methods, created on AdminController, let
me have on my backend controllers only any extra methods I would need.
Creating
Sounds like a good set up, I don't suppose you have an open source copy of
the admin system you use for 1.x? I wouldn't mind trying to implement it
into 2.x (but 1.3 may work)
Cheers :)
On 3 February 2012 12:11, Thaissa Mendes thaissa.men...@gmail.com wrote:
Yes, using an AdminController can
If I recall correctly, controllers within folders support was removed
in 2.x to encourage the use of plugins.
Someone correct me if I am wrong.
On Feb 3, 7:45 am, Stephen step...@ninjacodermonkey.co.uk wrote:
Sounds like a good set up, I don't suppose you have an open source copy of
the admin
You still can, you just need to use App::build() to show CakePHP where you
have extra controllers. It doesn't automatically recursively scan. You can,
however, use @ichikaway's AutoAppBuild plugin to automate this for you:
https://github.com/ichikaway/AutoAppBuild
--
Our newest site for the
Hi all,
I've been using CakePHP for 3-4 years, and I just downloaded and
started to check the 2.0 version.
One thing that I didn't like about 1.x version, and apparently didn't
change on 2.0, is the prefix routing. IMO, backend and frontend
methods on the same controller isn't a good idea. So,
just simply extend pathy for controllers with App::build()
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/2/2 Thaissa Mendes thaissa.men...@gmail.com
Hi all,
I've been using CakePHP for 3-4 years, and I just downloaded and
started to check the 2.0 version.
One thing that I didn't
It isn't a solution, but it's a start! Thanks!
On Thu, Feb 2, 2012 at 6:07 PM, Tilen Majerle tilen.maje...@gmail.com wrote:
just simply extend pathy for controllers with App::build()
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/2/2 Thaissa Mendes thaissa.men...@gmail.com
Hi all,
most would argue that it helps to keep it DRY to have all prefixed
ones in the same controller
in many cases the action is pretty identical, anyway
or the views - or both
On 2 Feb., 18:49, Thaissa Mendes thaissa.men...@gmail.com wrote:
It isn't a solution, but it's a start! Thanks!
On
Depends on how the app is built. I make backend and frontend
separately, so backend would have list/add/edit/delete methods, and
frontend only show and stuff like that. I have been working like
that for a few years and never had to duplicate any code.
On Thu, Feb 2, 2012 at 6:59 PM, euromark
Use plugins. In my projects I have an admin plugin, which works
wonderfully and I don't have to deal with prefixes, which I also
dislike.
On Feb 2, 10:05 am, Thaissa Mendes thaissa.men...@gmail.com wrote:
Depends on how the app is built. I make backend and frontend
separately, so backend would
That's an idea! But on 1.x, with my modifications, I could have
controllers/admin/*_controller.php inside my plugins too, and it was
working. That's the way I wish it to work, as I have several custom
plugins...
The App::build way only lets me add directories, not really work as it
should, on
I always assumed it was much better to use a prefix than to separate your
controllers or possibly duplicate code?
Using the AdminController extension (which I assume extends
AppController?), can this prevent duplicate code and what are the benefits
if you don't mind me asking?
Kind Regards
12 matches
Mail list logo