Questions tagged with class

1 answer

0 votes

Asked by marcusj, on 11/11/09 in

FormHelper ignores 'class' attribute for hidden fields

When I try to pass a class attribute to a hidden field, FormHelper ignores that. My code:


<?php echo($form->input('Foo.bar', array('type' => 'hidden', 'class' => 'baz')); ?>

FormHelper::input() calls[1] FormHelper::hidden() where name and class...

4 answers

1 vote

Asked by monsat, on 13/11/09 in

ClassRegistryクラス についてはどこで学べますか?

Controller や Model で、動的にModelを呼ぶときは、ClassRegistry::init()が良いと言われていますが、それについての情報があまり見つかりません。

使い方は、以下の通り簡単なので、問題ないのですが、ClassRegistoryクラス全般についての理解を深めたいと思っています。

どこかにまとまっていたりしますか?


$User = ClassRegistry::init('User');
$users =...

1 answer

0 votes

Asked by kani, on 27/11/09 in

class "connectionmanager" not found

i newly installed cakephp vertion 1.3

and all config is ok

Fatal error: class "connectionmanager" not found ... when i create model controller from console.


>cake bake
d 
m
v
...
>m
use <default/test>
[default]>
Fatal error: Class...

2 answers

0 votes

Asked by Max, on 16/12/09 in

including models in a stand alone class

I'm new to cakePHP and MVC so please bare with me. I want to create a class that can access the models but I don't know how. I tried a few things but it looks like the only way of loading one into a class is with $this-loadModel('modelname'); But...

1 answer

0 votes

Asked by afixisitansu, on 8/3/10 in

$form->error wrapped inside div and p tags.

How to display an error message wrapped inside a p tag which is further wrapped inside a div ,using $form-error('field name',array('class'='msg msg-error'));

The corresponding html code is:

<div class="msg msg-error"

I'm an error message and I'm...

0 answers

0 votes

Asked by nutbutter, on 2/5/10 in

App::import

I'm having trouble using App::import for vendor files on my remote server. Every time I try to import a vendor file I get this error:


Fatal error: Class 'classname' not found in /path/to/controller.php on line xx

It works on my local server, but...

1 answer

0 votes

Asked by GrzegorzPawlik, on 31/5/10 in

Why does Form::hidden drops class for input?

Why can't I do this:


$this->Form->hidden("name", array("class"=>"someClass"));

FormHelper drops class name I want to pass. Why is it that way?

0 answers

0 votes

Asked by weaponx86, on 8/6/10 in

Change Hash Function problem in 1.3

I followed the Simple ACL Tutorial but have a database of plain md5 passwords.

This line is storing an object of type of AppModel instead of Users.

$this-Auth-authenticate = ClassRegistry::init('Users');

The problem is when auth.php calls this...

0 answers

0 votes

Asked by sushidread, on 16/6/10 in

Debugger not found / from remote to local with MAMP

Hi,

I have an app developed with cake running on a remote server. I need to have the same identical app in my local dev machine (running MAMP on osx). I have tried to install a fresh cake php, downloaded my sql database from remote and connected...

1 answer

0 votes

Asked by ironma, 3 weeks, 2 days ago in

how to object-oriented programming ?

Hello.

I have a class Trees.

class TreesController extends AppController {

function index(){}

function add(){}

function edit{}

function moveup(){}

function movedown(){}

function delete(){}

}

I would like to use it many times in other controllers.

How can I...

<< previous next >>