concrete

how to pass php value from one file to another through java script

眉间皱痕 提交于 2020-01-01 19:40:36
问题 I am working with Concrete-5 CMS, I have an issue in passing value form view to controller.In my application I am using following code for displaying employee role. foreach($rd as $data){ echo "<tr><td>".$data[role_name]."</td><td>".$data[role_description]."</td><td><a href=".$this->action('edit', $data['role_id']).">Edit</a></td><td>".$ih->button_js(t('Delete'), "deleteRole('".$data['role_id']."')", 'left', 'error')."</td></tr>"; } <input type="hidden" name="rno" id="rno" /> script:

Concrete5 (5.7) - Don't cache page or current block on block error

♀尐吖头ヾ 提交于 2019-12-14 03:59:01
问题 I've got a block that relies on a fairly flaky third party service to get data to render so, when it does encounter a problem, I'd like to display an error message, rather than throw an exception and not render the page. Easy enough to do until you come to block/page caching. The data has a long lifetime so, when found, it's fine to cache everything. When it isn't, though, the page is cached with the error message in place. As such, I need to tell the CMS not to save the block or page output

Vector of virtual class : are pointers the clean way to go?

╄→гoц情女王★ 提交于 2019-12-13 15:25:15
问题 Note: This is almost a duplicate of this entry: Abstract classes and Pointers I need to create a vector of virtual classes. Here the idea: #include <vector> using namespace std; class VirtualFoo { protected: VirtualFoo(); virtual ~VirtualFoo(); public: virtual void doStuff()=0; }; class ConcreteFoo: public VirtualFoo { public: ConcreteFoo(double a); virtual ~ConcreteFoo(); void doStuff(); private: double a; }; class Foo { public: Foo(std::vector<VirtualFoo> foos); virtual ~Foo(); void

Builder (Joshua Bloch-style) for concrete implementation of abstract class?

醉酒当歌 提交于 2019-12-10 19:07:36
问题 Let's say I have an abstract class (BaseThing). It has one required parameter ("base required") and one optional parameter ("base optional"). I have a concrete class that extends it (Thing). It also has one required parameter ("required") and one optional parameter ("optional"). So something like: public abstract class BaseThing { public static final String DEFAULT_BASE_OPTIONAL = "Default Base Optional"; private final String baseRequired; private String baseOptional = DEFAULT_BASE_OPTIONAL;

concrete5 website API

此生再无相见时 提交于 2019-12-10 12:08:23
问题 I have some hierarchical data which I have organized in the concrete5 filemanager. I'd like to know if it is possible to access the filemanager from outside the concrete5 website by other apps (something in the manner of an API). This website made me hopeful that there could be an answer to this. Unfortunately, there was no followup tutorial. http://c5hub.com/learning/building-rest-api-using-concrete5-part-1/ My second question is very much related: is it possible to do the same thing to

how to pass php value from one file to another through java script

拜拜、爱过 提交于 2019-12-04 19:40:58
I am working with Concrete-5 CMS, I have an issue in passing value form view to controller.In my application I am using following code for displaying employee role. foreach($rd as $data){ echo "<tr><td>".$data[role_name]."</td><td>".$data[role_description]."</td><td><a href=".$this->action('edit', $data['role_id']).">Edit</a></td><td>".$ih->button_js(t('Delete'), "deleteRole('".$data['role_id']."')", 'left', 'error')."</td></tr>"; } <input type="hidden" name="rno" id="rno" /> script: $delConfirmJS = t('Are you sure you want to remove this Role?'); ?> <script type="text/javascript"> function

C#: Method to return object whose concrete type is determined at runtime?

落花浮王杯 提交于 2019-12-04 12:52:36
问题 I'm thinking about designing a method that would return an object that implements an interface but whose concrete type won't be know until run-time. For example suppose: ICar Ford implements ICar Bmw implements ICar Toyota implements ICar public ICar GetCarByPerson(int personId) We don't know what car we will get back until runtime. a) I want to know what type of car the person has. b) depending on the concrete car type we get back we will call different methods (because some methods only

Finding the Concrete Type behind an Interface instance

早过忘川 提交于 2019-11-28 05:14:47
To cut a long story short I have a C# function that performs a task on a given Type that is passed in as an Object instance. All works fine when a class instance is passed in. However, when the object is declared as an interface I'd really like to find the concrete class and perform the action upon that class type. Here is the ubiquitous bad example (resplendent with incorrect property casing etc): public interface IA { int a { get; set; } } public class B : IA { public int a { get; set; } public int b { get; set; } } public class C : IA { public int a { get; set; } public int c { get; set; }

Finding the Concrete Type behind an Interface instance

爷,独闯天下 提交于 2019-11-27 00:41:43
问题 To cut a long story short I have a C# function that performs a task on a given Type that is passed in as an Object instance. All works fine when a class instance is passed in. However, when the object is declared as an interface I'd really like to find the concrete class and perform the action upon that class type. Here is the ubiquitous bad example (resplendent with incorrect property casing etc): public interface IA { int a { get; set; } } public class B : IA { public int a { get; set; }