Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I tried display custom object in a block. #17

Open
tao-s opened this issue Mar 24, 2014 · 5 comments
Open

I tried display custom object in a block. #17

tao-s opened this issue Mar 24, 2014 · 5 comments

Comments

@tao-s
Copy link
Contributor

tao-s commented Mar 24, 2014

This add-on is great !

Today, I created a custom block for this add-on.
Is this way correct ?
https://gist.github.com/tao-s/9742395

Please give me a response.

@mkly
Copy link
Owner

mkly commented Mar 24, 2014

Hello,
I haven't finished the interface to that. I am open to adding a getAttribute() method to the data class. This is what I currently do.

// Attribute Handle my_data_attribtue
$data->myDataAttribute->getValue('display');

That said, as soon as I get time I am going to add a getAttribute() method that works like the User, File etc.

This test shows a bit about setting and getting attribtues
https://github.com/mkly/Data/blob/master/tests/tests/models/data.php#L49-L64

@mkly
Copy link
Owner

mkly commented Mar 24, 2014

Adding this as enhancement as a getAttribute() method should be implemented.

@tao-s
Copy link
Contributor Author

tao-s commented Mar 24, 2014

Thank you mkly.

That said, as soon as I get time I am going to add a getAttribute() method that works like the User, File etc.

That sounds great.
OK, I wait it.
The Japanese team will looking forward to it.

Is there something that we can help with?

@mkly
Copy link
Owner

mkly commented Mar 24, 2014

Any ideas you might have to make it more useful to you would be great. If you are looking for things to add, you can try adding getAttribute(). I was just going to make it work like
https://github.com/concrete5/concrete5/blob/master/web/concrete/core/models/userinfo.php#L349-L366
Maybe I would write the code different. But the same method interface.

There's also #11 as search could be a lot better.

But most important is just letting me know any ideas you might have to make it better.

Thanks for the encouragement,
Mike

@tao-s
Copy link
Contributor Author

tao-s commented Mar 24, 2014

OK, I'll ask to Japanese team what have any good ideas about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants